6 lines
152 KiB
JavaScript
6 lines
152 KiB
JavaScript
var DOKU_BASE='/';var DOKU_TPL='/lib/tpl/sprintdoc/';var DOKU_COOKIE_PARAM={"path":"\/","secure":false};Object.defineProperty(window,'DOKU_UHN',{get:function(){console.warn('Using DOKU_UHN is deprecated. Please use JSINFO.useHeadingNavigation instead');return JSINFO.useHeadingNavigation;}});Object.defineProperty(window,'DOKU_UHC',{get:function(){console.warn('Using DOKU_UHC is deprecated. Please use JSINFO.useHeadingContent instead');return JSINFO.useHeadingContent;}});LANG={"search_toggle_tools":"Suchwerkzeuge umschalten","willexpire":"Die Sperre zur Bearbeitung dieser Seite l\u00e4uft in einer Minute ab.\\nUm Bearbeitungskonflikte zu vermeiden, sollten Sie sie durch einen Klick auf den Vorschau-Knopf verl\u00e4ngern.","notsavedyet":"Nicht gespeicherte \u00c4nderungen gehen verloren!","searchmedia":"Suche Dateien","keepopen":"Fenster nach Auswahl nicht schlie\u00dfen","hidedetails":"Details ausblenden","mediatitle":"Linkeinstellungen","mediadisplay":"Linktyp","mediaalign":"Ausrichtung","mediasize":"Bildgr\u00f6\u00dfe","mediatarget":"Linkziel","mediaclose":"Schlie\u00dfen","mediainsert":"Einf\u00fcgen","mediadisplayimg":"Bild anzeigen.","mediadisplaylnk":"Nur den Link anzeigen.","mediasmall":"Kleine Version","mediamedium":"Mittlere Version","medialarge":"Gro\u00dfe Version","mediaoriginal":"Originalversion","medialnk":"Link zur Detailseite","mediadirect":"Direktlink zum Original","medianolnk":"Kein Link","medianolink":"Bild nicht verlinken","medialeft":"Das Bild links ausrichten.","mediaright":"Das Bild rechts ausrichten.","mediacenter":"Das Bild in der Mitte ausrichten.","medianoalign":"Keine Ausrichtung benutzen.","nosmblinks":"Das Verlinken von Windows-Freigaben funktioniert nur im Microsoft Internet Explorer.\\nDer Link kann jedoch durch Kopieren und Einf\u00fcgen verwendet werden.","linkwiz":"Link-Assistent","linkto":"Link nach:","del_confirm":"Eintrag wirklich l\u00f6schen?","restore_confirm":"Wirklich diese Version wiederherstellen?","media_diff":"Unterschiede anzeigen:","media_diff_both":"Nebeneinander","media_diff_opacity":"\u00dcberblenden","media_diff_portions":"\u00dcbergang","media_select":"Dateien ausw\u00e4hlen\u2026","media_upload_btn":"Hochladen","media_done_btn":"Fertig","media_drop":"Dateien hier hinziehen, um sie hochzuladen","media_cancel":"Entfernen","media_overwrt":"Existierende Dateien \u00fcberschreiben","data_insecure":"WARNUNG: Es scheint, als w\u00e4re Ihr Datenverzeichnis nicht ausreichend gesch\u00fctzt. Bitte informieren Sie sich zur <a href=\"https:\/\/www.dokuwiki.org\/security#web_access_security\">Sicherheit von Webzugriffen in DokuWiki<\/a>","plugins":{"extension":{"reallydel":"Wollen Sie diese Erweiterung wirklich l\u00f6schen?","display_viewoptions":"Optionen anzeigen","display_enabled":"aktiviert","display_disabled":"deaktiviert","display_updatable":"aktualisierbar"},"logviewer":{"filter":"Zeilen filtern:"},"styling":{"loader":"Vorschau l\u00e4dt...<br \/>Falls diese Nachricht nicht verschwindet, k\u00f6nnten Ihre Werte fehlerhaft sein","popup":"\u00d6ffne als Popup"}}};var toolbar=[{"type":"format","title":"Markierten Text als Aufgabe\/Todo","icon":"..\/..\/plugins\/todo\/todo.png","open":"<todo>","close":"<\/todo>","block":false}];(function(factory){if(typeof define==='function'&&define.amd){define(['jquery'],factory);}else if(typeof exports==='object'){factory(require('jquery'));}else{factory(jQuery);}}(function($){var pluses=/\+/g;function encode(s){return config.raw?s:encodeURIComponent(s);}function decode(s){return config.raw?s:decodeURIComponent(s);}function stringifyCookieValue(value){return encode(config.json?JSON.stringify(value):String(value));}function parseCookieValue(s){if(s.indexOf('"')===0){s=s.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,'\\');}try{s=decodeURIComponent(s.replace(pluses,' '));return config.json?JSON.parse(s):s;}catch(e){}}function read(s,converter){var value=config.raw?s:parseCookieValue(s);return $.isFunction(converter)?converter(value):value;}var config=$.cookie=function(key,value,options){if(value!==undefined&&!$.isFunction(value)){options=$.extend({},config.defaults,options);if(typeof options.expires==='number'){var days=options.expires,t=options.expires=new Date();t.setTime(+t+days*864e+5);}return(document.cookie=[encode(key),'=',stringifyCookieValue(value),options.expires?'; expires='+options.expires.toUTCString():'',options.path?'; path='+options.path:'',options.domain?'; domain='+options.domain:'',options.secure?'; secure':''].join(''));}var result=key?undefined:{};var cookies=document.cookie?document.cookie.split('; '):[];for(var i=0,l=cookies.length;i<l;i++){var parts=cookies[i].split('=');var name=decode(parts.shift());var cookie=parts.join('=');if(key&&key===name){result=read(cookie,value);break;}if(!key&&(cookie=read(cookie))!==undefined){result[name]=cookie;}}return result;};config.defaults={};$.removeCookie=function(key,options){if($.cookie(key)===undefined){return false;}$.cookie(key,'',$.extend({},options,{expires:-1}));return!$.cookie(key);};}));(function(factory){"use strict";if(typeof define==="function"&&define.amd){define(["../widgets/datepicker"],factory);}else{factory(jQuery.datepicker);}})(function(datepicker){"use strict";datepicker.regional.de={closeText:"Schließen",prevText:"Zurück",nextText:"Vor",currentText:"Heute",monthNames:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],monthNamesShort:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],dayNames:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],dayNamesShort:["So","Mo","Di","Mi","Do","Fr","Sa"],dayNamesMin:["So","Mo","Di","Mi","Do","Fr","Sa"],weekHeader:"KW",dateFormat:"dd.mm.yy",firstDay:1,isRTL:false,showMonthAfterYear:false,yearSuffix:""};datepicker.setDefaults(datepicker.regional.de);return datepicker.regional.de;});var qq=qq||{};qq.extend=function(first,second){for(var prop in second){first[prop]=second[prop];}};qq.indexOf=function(arr,elt,from){if(arr.indexOf)return arr.indexOf(elt,from);from=from||0;var len=arr.length;if(from<0)from+=len;for(;from<len;from++){if(from in arr&&arr[from]===elt){return from;}}return-1;};qq.getUniqueId=(function(){var id=0;return function(){return id++;};})();qq.attach=function(element,type,fn){if(element.addEventListener){element.addEventListener(type,fn,false);}else if(element.attachEvent){element.attachEvent('on'+type,fn);}};qq.detach=function(element,type,fn){if(element.removeEventListener){element.removeEventListener(type,fn,false);}else if(element.attachEvent){element.detachEvent('on'+type,fn);}};qq.preventDefault=function(e){if(e.preventDefault){e.preventDefault();}else{e.returnValue=false;}};qq.insertBefore=function(a,b){b.parentNode.insertBefore(a,b);};qq.remove=function(element){element.parentNode.removeChild(element);};qq.contains=function(parent,descendant){if(parent==descendant)return true;if(parent.contains){return parent.contains(descendant);}else{return!!(descendant.compareDocumentPosition(parent)&8);}};qq.toElement=(function(){var div=document.createElement('div');return function(html){div.innerHTML=html;var element=div.firstChild;div.removeChild(element);return element;};})();qq.css=function(element,styles){if(styles.opacity!=null){if(typeof element.style.opacity!='string'&&typeof(element.filters)!='undefined'){styles.filter='alpha(opacity='+Math.round(100*styles.opacity)+')';}}qq.extend(element.style,styles);};qq.hasClass=function(element,name){var re=new RegExp('(^| )'+name+'( |$)');return re.test(element.className);};qq.addClass=function(element,name){if(!qq.hasClass(element,name)){element.className+=' '+name;}};qq.removeClass=function(element,name){var re=new RegExp('(^| )'+name+'( |$)');element.className=element.className.replace(re,' ').replace(/^\s+|\s+$/g,"");};qq.setText=function(element,text){element.innerText=text;element.textContent=text;};qq.children=function(element){var children=[],child=element.firstChild;while(child){if(child.nodeType==1){children.push(child);}child=child.nextSibling;}return children;};qq.getByClass=function(element,className){if(element.querySelectorAll){return element.querySelectorAll('.'+className);}var result=[];var candidates=element.getElementsByTagName("*");var len=candidates.length;for(var i=0;i<len;i++){if(qq.hasClass(candidates[i],className)){result.push(candidates[i]);}}return result;};qq.obj2url=function(obj,temp,prefixDone){var uristrings=[],prefix='&',add=function(nextObj,i){var nextTemp=temp?(/\[\]$/.test(temp))?temp:temp+'['+i+']':i;if((nextTemp!='undefined')&&(i!='undefined')){uristrings.push((typeof nextObj==='object')?qq.obj2url(nextObj,nextTemp,true):(Object.prototype.toString.call(nextObj)==='[object Function]')?encodeURIComponent(nextTemp)+'='+encodeURIComponent(nextObj()):encodeURIComponent(nextTemp)+'='+encodeURIComponent(nextObj));}};if(!prefixDone&&temp){prefix=(/\?/.test(temp))?(/\?$/.test(temp))?'':'&':'?';uristrings.push(temp);uristrings.push(qq.obj2url(obj));}else if((Object.prototype.toString.call(obj)==='[object Array]')&&(typeof obj!='undefined')){for(var i=0,len=obj.length;i<len;++i){add(obj[i],i);}}else if((typeof obj!='undefined')&&(obj!==null)&&(typeof obj==="object")){for(var i in obj){if(obj.hasOwnProperty(i)&&typeof obj[i]!='function'){add(obj[i],i);}}}else{uristrings.push(encodeURIComponent(temp)+'='+encodeURIComponent(obj));}return uristrings.join(prefix).replace(/^&/,'').replace(/%20/g,'+');};var qq=qq||{};qq.FileUploaderBasic=function(o){this._options={debug:false,action:'/server/upload',params:{},button:null,multiple:true,maxConnections:3,allowedExtensions:[],sizeLimit:0,minSizeLimit:0,onSubmit:function(id,fileName){},onProgress:function(id,fileName,loaded,total){},onComplete:function(id,fileName,responseJSON){},onCancel:function(id,fileName){},messages:{typeError:"{file} has invalid extension. Only {extensions} are allowed.",sizeError:"{file} is too large, maximum file size is {sizeLimit}.",minSizeError:"{file} is too small, minimum file size is {minSizeLimit}.",emptyError:"{file} is empty, please select files again without it.",onLeave:"The files are being uploaded, if you leave now the upload will be cancelled."},showMessage:function(message){alert(message);}};qq.extend(this._options,o);this._filesInProgress=0;this._handler=this._createUploadHandler();if(this._options.button){this._button=this._createUploadButton(this._options.button);}this._preventLeaveInProgress();};qq.FileUploaderBasic.prototype={setParams:function(params){this._options.params=params;},getInProgress:function(){return this._filesInProgress;},_createUploadButton:function(element){var self=this;return new qq.UploadButton({element:element,multiple:this._options.multiple&&qq.UploadHandlerXhr.isSupported(),onChange:function(input){self._onInputChange(input);}});},_createUploadHandler:function(){var self=this,handlerClass;if(qq.UploadHandlerXhr.isSupported()){handlerClass='UploadHandlerXhr';}else{handlerClass='UploadHandlerForm';}var handler=new qq[handlerClass]({debug:this._options.debug,action:this._options.action,maxConnections:this._options.maxConnections,onProgress:function(id,fileName,loaded,total){self._onProgress(id,fileName,loaded,total);self._options.onProgress(id,fileName,loaded,total);},onComplete:function(id,fileName,result){self._onComplete(id,fileName,result);self._options.onComplete(id,fileName,result);},onCancel:function(id,fileName){self._onCancel(id,fileName);self._options.onCancel(id,fileName);}});return handler;},_preventLeaveInProgress:function(){var self=this;qq.attach(window,'beforeunload',function(e){if(!self._filesInProgress){return;}var e=e||window.event;e.returnValue=self._options.messages.onLeave;return self._options.messages.onLeave;});},_onSubmit:function(id,fileName){this._filesInProgress++;},_onProgress:function(id,fileName,loaded,total){},_onComplete:function(id,fileName,result){this._filesInProgress--;if(result.error){this._options.showMessage(result.error);}},_onCancel:function(id,fileName){this._filesInProgress--;},_onInputChange:function(input){if(this._handler instanceof qq.UploadHandlerXhr){this._uploadFileList(input.files);}else{if(this._validateFile(input)){this._uploadFile(input);}}this._button.reset();},_uploadFileList:function(files){for(var i=0;i<files.length;i++){if(!this._validateFile(files[i])){return;}}for(var i=0;i<files.length;i++){this._uploadFile(files[i]);}},_uploadFile:function(fileContainer){var id=this._handler.add(fileContainer);var fileName=this._handler.getName(id);if(this._options.onSubmit(id,fileName)!==false){this._onSubmit(id,fileName);this._handler.upload(id,this._options.params);}},_validateFile:function(file){var name,size;if(file.value){name=file.value.replace(/.*(\/|\\)/,"");}else{name=file.fileName!=null?file.fileName:file.name;size=file.fileSize!=null?file.fileSize:file.size;}if(!this._isAllowedExtension(name)){this._error('typeError',name);return false;}else if(size===0){this._error('emptyError',name);return false;}else if(size&&this._options.sizeLimit&&size>this._options.sizeLimit){this._error('sizeError',name);return false;}else if(size&&size<this._options.minSizeLimit){this._error('minSizeError',name);return false;}return true;},_error:function(code,fileName){var message=this._options.messages[code];function r(name,replacement){message=message.replace(name,replacement);}r('{file}',this._formatFileName(fileName));r('{extensions}',this._options.allowedExtensions.join(', '));r('{sizeLimit}',this._formatSize(this._options.sizeLimit));r('{minSizeLimit}',this._formatSize(this._options.minSizeLimit));this._options.showMessage(message);},_formatFileName:function(name){if(name.length>33){name=name.slice(0,19)+'...'+name.slice(-13);}return name;},_isAllowedExtension:function(fileName){var ext=(-1!==fileName.indexOf('.'))?fileName.replace(/.*[.]/,'').toLowerCase():'';var allowed=this._options.allowedExtensions;if(!allowed.length){return true;}for(var i=0;i<allowed.length;i++){if(allowed[i].toLowerCase()==ext){return true;}}return false;},_formatSize:function(bytes){var i=-1;do{bytes=bytes/1024;i++;}while(bytes>99);return Math.max(bytes,0.1).toFixed(1)+['kB','MB','GB','TB','PB','EB'][i];}};qq.FileUploader=function(o){qq.FileUploaderBasic.apply(this,arguments);qq.extend(this._options,{element:null,listElement:null,template:'<div class="qq-uploader">'+'<div class="qq-upload-drop-area"><span>Drop files here to upload</span></div>'+'<div class="qq-upload-button">Upload a file</div>'+'<ul class="qq-upload-list"></ul>'+'</div>',fileTemplate:'<li>'+'<span class="qq-upload-file"></span>'+'<span class="qq-upload-spinner"></span>'+'<span class="qq-upload-size"></span>'+'<a class="qq-upload-cancel" href="#">Cancel</a>'+'<span class="qq-upload-failed-text">Failed</span>'+'</li>',classes:{button:'qq-upload-button',drop:'qq-upload-drop-area',dropActive:'qq-upload-drop-area-active',list:'qq-upload-list',file:'qq-upload-file',spinner:'qq-upload-spinner',size:'qq-upload-size',cancel:'qq-upload-cancel',success:'qq-upload-success',fail:'qq-upload-fail'}});qq.extend(this._options,o);this._element=this._options.element;this._element.innerHTML=this._options.template;this._listElement=this._options.listElement||this._find(this._element,'list');this._classes=this._options.classes;this._button=this._createUploadButton(this._find(this._element,'button'));this._bindCancelEvent();this._setupDragDrop();};qq.extend(qq.FileUploader.prototype,qq.FileUploaderBasic.prototype);qq.extend(qq.FileUploader.prototype,{_find:function(parent,type){var element=qq.getByClass(parent,this._options.classes[type])[0];if(!element){throw new Error('element not found '+type);}return element;},_setupDragDrop:function(){var self=this,dropArea=this._find(this._element,'drop');var dz=new qq.UploadDropZone({element:dropArea,onEnter:function(e){qq.addClass(dropArea,self._classes.dropActive);e.stopPropagation();},onLeave:function(e){e.stopPropagation();},onLeaveNotDescendants:function(e){qq.removeClass(dropArea,self._classes.dropActive);},onDrop:function(e){dropArea.style.display='none';qq.removeClass(dropArea,self._classes.dropActive);self._uploadFileList(e.dataTransfer.files);}});dropArea.style.display='none';qq.attach(document,'dragenter',function(e){if(!dz._isValidFileDrag(e))return;dropArea.style.display='block';});qq.attach(document,'dragleave',function(e){if(!dz._isValidFileDrag(e))return;var relatedTarget=document.elementFromPoint(e.clientX,e.clientY);if(!relatedTarget||relatedTarget.nodeName=="HTML"){dropArea.style.display='none';}});},_onSubmit:function(id,fileName){qq.FileUploaderBasic.prototype._onSubmit.apply(this,arguments);this._addToList(id,fileName);},_onProgress:function(id,fileName,loaded,total){qq.FileUploaderBasic.prototype._onProgress.apply(this,arguments);var item=this._getItemByFileId(id);var size=this._find(item,'size');size.style.display='inline';var text;if(loaded!=total){text=Math.round(loaded/total*100)+'% from '+this._formatSize(total);}else{text=this._formatSize(total);}qq.setText(size,text);},_onComplete:function(id,fileName,result){qq.FileUploaderBasic.prototype._onComplete.apply(this,arguments);var item=this._getItemByFileId(id);qq.remove(this._find(item,'cancel'));qq.remove(this._find(item,'spinner'));if(result.success){qq.addClass(item,this._classes.success);}else{qq.addClass(item,this._classes.fail);}},_addToList:function(id,fileName){var item=qq.toElement(this._options.fileTemplate);item.qqFileId=id;var fileElement=this._find(item,'file');qq.setText(fileElement,this._formatFileName(fileName));this._find(item,'size').style.display='none';this._listElement.appendChild(item);},_getItemByFileId:function(id){var item=this._listElement.firstChild;while(item){if(item.qqFileId==id)return item;item=item.nextSibling;}},_bindCancelEvent:function(){var self=this,list=this._listElement;qq.attach(list,'click',function(e){e=e||window.event;var target=e.target||e.srcElement;if(qq.hasClass(target,self._classes.cancel)){qq.preventDefault(e);var item=target.parentNode;self._handler.cancel(item.qqFileId);qq.remove(item);}});}});qq.UploadDropZone=function(o){this._options={element:null,onEnter:function(e){},onLeave:function(e){},onLeaveNotDescendants:function(e){},onDrop:function(e){}};qq.extend(this._options,o);this._element=this._options.element;this._disableDropOutside();this._attachEvents();};qq.UploadDropZone.prototype={_disableDropOutside:function(e){if(!qq.UploadDropZone.dropOutsideDisabled){qq.attach(document,'dragover',function(e){if(e.dataTransfer){e.dataTransfer.dropEffect='none';e.preventDefault();}});qq.UploadDropZone.dropOutsideDisabled=true;}},_attachEvents:function(){var self=this;qq.attach(self._element,'dragover',function(e){if(!self._isValidFileDrag(e))return;var effect=e.dataTransfer.effectAllowed;if(effect=='move'||effect=='linkMove'){e.dataTransfer.dropEffect='move';}else{e.dataTransfer.dropEffect='copy';}e.stopPropagation();e.preventDefault();});qq.attach(self._element,'dragenter',function(e){if(!self._isValidFileDrag(e))return;self._options.onEnter(e);});qq.attach(self._element,'dragleave',function(e){if(!self._isValidFileDrag(e))return;self._options.onLeave(e);var relatedTarget=document.elementFromPoint(e.clientX,e.clientY);if(qq.contains(this,relatedTarget))return;self._options.onLeaveNotDescendants(e);});qq.attach(self._element,'drop',function(e){if(!self._isValidFileDrag(e))return;e.preventDefault();self._options.onDrop(e);});},_isValidFileDrag:function(e){var dt=e.dataTransfer,isWebkit=navigator.userAgent.indexOf("AppleWebKit")>-1;return dt&&dt.effectAllowed!='none'&&(dt.files||(!isWebkit&&dt.types.contains&&dt.types.contains('Files')));}};qq.UploadButton=function(o){this._options={element:null,multiple:false,name:'file',onChange:function(input){},hoverClass:'qq-upload-button-hover',focusClass:'qq-upload-button-focus'};qq.extend(this._options,o);this._element=this._options.element;qq.css(this._element,{position:'relative',overflow:'hidden',direction:'ltr'});this._input=this._createInput();};qq.UploadButton.prototype={getInput:function(){return this._input;},reset:function(){if(this._input.parentNode){qq.remove(this._input);}qq.removeClass(this._element,this._options.focusClass);this._input=this._createInput();},_createInput:function(){var input=document.createElement("input");if(this._options.multiple){input.setAttribute("multiple","multiple");}input.setAttribute("type","file");input.setAttribute("name",this._options.name);qq.css(input,{position:'absolute',right:0,top:0,fontFamily:'Arial',fontSize:'118px',margin:0,padding:0,cursor:'pointer',opacity:0});this._element.appendChild(input);var self=this;qq.attach(input,'change',function(){self._options.onChange(input);});qq.attach(input,'mouseover',function(){qq.addClass(self._element,self._options.hoverClass);});qq.attach(input,'mouseout',function(){qq.removeClass(self._element,self._options.hoverClass);});qq.attach(input,'focus',function(){qq.addClass(self._element,self._options.focusClass);});qq.attach(input,'blur',function(){qq.removeClass(self._element,self._options.focusClass);});if(window.attachEvent){input.setAttribute('tabIndex',"-1");}return input;}};qq.UploadHandlerAbstract=function(o){this._options={debug:false,action:'/upload.php',maxConnections:999,onProgress:function(id,fileName,loaded,total){},onComplete:function(id,fileName,response){},onCancel:function(id,fileName){}};qq.extend(this._options,o);this._queue=[];this._params=[];};qq.UploadHandlerAbstract.prototype={log:function(str){if(this._options.debug&&window.console)console.log('[uploader] '+str);},add:function(file){},upload:function(id,params){var len=this._queue.push(id);var copy={};qq.extend(copy,params);this._params[id]=copy;if(len<=this._options.maxConnections){this._upload(id,this._params[id]);}},cancel:function(id){this._cancel(id);this._dequeue(id);},cancelAll:function(){for(var i=0;i<this._queue.length;i++){this._cancel(this._queue[i]);}this._queue=[];},getName:function(id){},getSize:function(id){},getQueue:function(){return this._queue;},_upload:function(id){},_cancel:function(id){},_dequeue:function(id){var i=qq.indexOf(this._queue,id);this._queue.splice(i,1);var max=this._options.maxConnections;if(this._queue.length>=max&&i<max){var nextId=this._queue[max-1];this._upload(nextId,this._params[nextId]);}}};qq.UploadHandlerForm=function(o){qq.UploadHandlerAbstract.apply(this,arguments);this._inputs={};};qq.extend(qq.UploadHandlerForm.prototype,qq.UploadHandlerAbstract.prototype);qq.extend(qq.UploadHandlerForm.prototype,{add:function(fileInput){fileInput.setAttribute('name','qqfile');var id='qq-upload-handler-iframe'+qq.getUniqueId();this._inputs[id]=fileInput;if(fileInput.parentNode){qq.remove(fileInput);}return id;},getName:function(id){return this._inputs[id].value.replace(/.*(\/|\\)/,"");},_cancel:function(id){this._options.onCancel(id,this.getName(id));delete this._inputs[id];var iframe=document.getElementById(id);if(iframe){iframe.setAttribute('src','javascript:false;');qq.remove(iframe);}},_upload:function(id,params){var input=this._inputs[id];if(!input){throw new Error('file with passed id was not added, or already uploaded or cancelled');}var fileName=this.getName(id);var iframe=this._createIframe(id);var form=this._createForm(iframe,params);form.appendChild(input);var self=this;this._attachLoadEvent(iframe,function(){self.log('iframe loaded');var response=self._getIframeContentJSON(iframe);self._options.onComplete(id,fileName,response);self._dequeue(id);delete self._inputs[id];setTimeout(function(){qq.remove(iframe);},1);});form.submit();qq.remove(form);return id;},_attachLoadEvent:function(iframe,callback){qq.attach(iframe,'load',function(){if(!iframe.parentNode){return;}if(iframe.contentDocument&&iframe.contentDocument.body&&iframe.contentDocument.body.innerHTML=="false"){return;}callback();});},_getIframeContentJSON:function(iframe){var doc=iframe.contentDocument?iframe.contentDocument:iframe.contentWindow.document,response;this.log("converting iframe's innerHTML to JSON");this.log("innerHTML = "+doc.body.innerHTML);try{response=eval("("+doc.body.innerHTML+")");}catch(err){response={};}return response;},_createIframe:function(id){var iframe=qq.toElement('<iframe src="javascript:false;" name="'+id+'" />');iframe.setAttribute('id',id);iframe.style.display='none';document.body.appendChild(iframe);return iframe;},_createForm:function(iframe,params){var form=qq.toElement('<form method="post" enctype="multipart/form-data"></form>');var queryString=qq.obj2url(params,this._options.action);form.setAttribute('action',queryString);form.setAttribute('target',iframe.name);form.style.display='none';document.body.appendChild(form);return form;}});qq.UploadHandlerXhr=function(o){qq.UploadHandlerAbstract.apply(this,arguments);this._files=[];this._xhrs=[];this._loaded=[];};qq.UploadHandlerXhr.isSupported=function(){var input=document.createElement('input');input.type='file';return('multiple'in input&&typeof File!="undefined"&&typeof(new XMLHttpRequest()).upload!="undefined");};qq.extend(qq.UploadHandlerXhr.prototype,qq.UploadHandlerAbstract.prototype);qq.extend(qq.UploadHandlerXhr.prototype,{add:function(file){if(!(file instanceof File)){throw new Error('Passed obj in not a File (in qq.UploadHandlerXhr)');}return this._files.push(file)-1;},getName:function(id){var file=this._files[id];return file.fileName!=null?file.fileName:file.name;},getSize:function(id){var file=this._files[id];return file.fileSize!=null?file.fileSize:file.size;},getLoaded:function(id){return this._loaded[id]||0;},_upload:function(id,params){var file=this._files[id],name=this.getName(id),size=this.getSize(id);this._loaded[id]=0;var xhr=this._xhrs[id]=new XMLHttpRequest();var self=this;xhr.upload.onprogress=function(e){if(e.lengthComputable){self._loaded[id]=e.loaded;self._options.onProgress(id,name,e.loaded,e.total);}};xhr.onreadystatechange=function(){if(xhr.readyState==4){self._onComplete(id,xhr);}};params=params||{};params['qqfile']=name;var queryString=qq.obj2url(params,this._options.action);xhr.open("POST",queryString,true);xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");xhr.setRequestHeader("X-File-Name",encodeURIComponent(name));xhr.setRequestHeader("Content-Type","application/octet-stream");xhr.send(file);},_onComplete:function(id,xhr){if(!this._files[id])return;var name=this.getName(id);var size=this.getSize(id);this._options.onProgress(id,name,size,size);if(xhr.status==200){this.log("xhr - server response received");this.log("responseText = "+xhr.responseText);var response;try{response=eval("("+xhr.responseText+")");}catch(err){response={};}this._options.onComplete(id,name,response);}else{this._options.onComplete(id,name,{});}this._files[id]=null;this._xhrs[id]=null;this._dequeue(id);},_cancel:function(id){this._options.onCancel(id,this.getName(id));this._files[id]=null;if(this._xhrs[id]){this._xhrs[id].abort();this._xhrs[id]=null;}}});qq.extend(qq.FileUploader.prototype,{_createUploadHandler:function(){var self=this,handlerClass;if(qq.UploadHandlerXhr.isSupported()){handlerClass='UploadHandlerXhr';}else{handlerClass='UploadHandlerForm';}var handler=new qq[handlerClass]({debug:this._options.debug,action:this._options.action,maxConnections:this._options.maxConnections,onProgress:function(id,fileName,loaded,total){self._onProgress(id,fileName,loaded,total);self._options.onProgress(id,fileName,loaded,total);},onComplete:function(id,fileName,result){self._onComplete(id,fileName,result);self._options.onComplete(id,fileName,result);},onCancel:function(id,fileName){self._onCancel(id,fileName);self._options.onCancel(id,fileName);},onUpload:function(){self._onUpload();}});return handler;},_onUpload:function(){this._handler.uploadAll(this._options.params);},_uploadFile:function(fileContainer){var id=this._handler.add(fileContainer);var fileName=this._handler.getName(id);if(this._options.onSubmit(id,fileName)!==false){this._onSubmit(id,fileName);}},_addToList:function(id,fileName){var item=qq.toElement(this._options.fileTemplate);item.qqFileId=id;var fileElement=this._find(item,'file');qq.setText(fileElement,fileName);this._find(item,'size').style.display='none';var nameElement=this._find(item,'nameInput');fileName=fileName.toLowerCase();fileName=fileName.replace(/([ !"#$%&\'()+,\/;<=>?@[\]^`{|}~:]+)/g,'_');fileName=fileName.replace(/^_+/,'');nameElement.value=fileName;nameElement.id='mediamanager__upload_item'+id;this._listElement.appendChild(item);}});qq.FileUploaderExtended=function(o){qq.FileUploaderBasic.apply(this,arguments);qq.extend(this._options,{element:null,listElement:null,template:'<div class="qq-uploader">'+'<div class="qq-upload-drop-area"><span>'+LANG.media_drop+'</span></div>'+'<div class="qq-upload-button">'+LANG.media_select+'</div>'+'<ul class="qq-upload-list"></ul>'+'<div class="qq-action-container">'+' <button class="qq-upload-action" type="submit" id="mediamanager__upload_button">'+LANG.media_upload_btn+'</button>'+' <label class="qq-overwrite-check"><input type="checkbox" value="1" name="ow" class="dw__ow"> <span>'+LANG.media_overwrt+'</span></label>'+'</div>'+'</div>',fileTemplate:'<li>'+'<span class="qq-upload-file hidden"></span>'+' <input class="qq-upload-name-input edit" type="text" value="" />'+' <span class="qq-upload-spinner hidden"></span>'+' <span class="qq-upload-size"></span>'+' <a class="qq-upload-cancel" href="#">'+LANG.media_cancel+'</a>'+' <span class="qq-upload-failed-text error">Failed</span>'+'</li>',classes:{button:'qq-upload-button',drop:'qq-upload-drop-area',dropActive:'qq-upload-drop-area-active',list:'qq-upload-list',nameInput:'qq-upload-name-input',overwriteInput:'qq-overwrite-check',uploadButton:'qq-upload-action',file:'qq-upload-file',spinner:'qq-upload-spinner',size:'qq-upload-size',cancel:'qq-upload-cancel',success:'qq-upload-success',fail:'qq-upload-fail',failedText:'qq-upload-failed-text'}});qq.extend(this._options,o);this._element=this._options.element;this._element.innerHTML=this._options.template;this._listElement=this._options.listElement||this._find(this._element,'list');this._classes=this._options.classes;this._button=this._createUploadButton(this._find(this._element,'button'));this._bindCancelEvent();this._bindUploadEvent();this._setupDragDrop();};qq.extend(qq.FileUploaderExtended.prototype,qq.FileUploader.prototype);qq.extend(qq.FileUploaderExtended.prototype,{_bindUploadEvent:function(){var self=this,list=this._listElement;qq.attach(document.getElementById('mediamanager__upload_button'),'click',function(e){e=e||window.event;var target=e.target||e.srcElement;qq.preventDefault(e);self._handler._options.onUpload();jQuery(".qq-upload-name-input").each(function(i){jQuery(this).prop('disabled',true);});});},_onComplete:function(id,fileName,result){this._filesInProgress--;var item=this._getItemByFileId(id);qq.remove(this._find(item,'cancel'));qq.remove(this._find(item,'spinner'));var nameInput=this._find(item,'nameInput');var fileElement=this._find(item,'file');qq.setText(fileElement,nameInput.value);qq.removeClass(fileElement,'hidden');qq.remove(nameInput);jQuery('.qq-upload-button, #mediamanager__upload_button').remove();jQuery('.dw__ow').parent().hide();jQuery('.qq-upload-drop-area').remove();if(result.success){qq.addClass(item,this._classes.success);$link='<a href="'+result.link+'" id="h_:'+result.id+'" class="select">'+nameInput.value+'</a>';jQuery(fileElement).html($link);}else{qq.addClass(item,this._classes.fail);var fail=this._find(item,'failedText');if(result.error)qq.setText(fail,result.error);}if(document.getElementById('media__content')&&!document.getElementById('mediamanager__done_form')){var action=document.location.href;var i=action.indexOf('?');if(i)action=action.substr(0,i);var button='<form method="post" action="'+action+'" id="mediamanager__done_form"><div>';button+='<input type="hidden" value="'+result.ns+'" name="ns">';button+='<input type="hidden" value="1" name="recent">';button+='<button type="submit">'+LANG.media_done_btn+'</button></div></form>';jQuery('#mediamanager__uploader').append(button);}}});qq.extend(qq.UploadHandlerForm.prototype,{uploadAll:function(params){this._uploadAll(params);},getName:function(id){var file=this._inputs[id];var name=document.getElementById('mediamanager__upload_item'+id);if(name!=null){return name.value;}else{if(file!=null){return file.value.replace(/.*(\/|\\)/,"");}else{return null;}}},_uploadAll:function(params){jQuery(".qq-upload-spinner").each(function(i){jQuery(this).removeClass('hidden');});for(key in this._inputs){this.upload(key,params);}},_upload:function(id,params){var input=this._inputs[id];if(!input){throw new Error('file with passed id was not added, or already uploaded or cancelled');}var fileName=this.getName(id);var iframe=this._createIframe(id);var form=this._createForm(iframe,params);form.appendChild(input);var nameInput=qq.toElement('<input name="mediaid" value="'+fileName+'" type="text">');form.appendChild(nameInput);var checked=jQuery('.dw__ow').is(':checked');var owCheckbox=jQuery('.dw__ow').clone();owCheckbox.attr('checked',checked);jQuery(form).append(owCheckbox);var self=this;this._attachLoadEvent(iframe,function(){self.log('iframe loaded');var response=self._getIframeContentJSON(iframe);self._options.onComplete(id,fileName,response);self._dequeue(id);delete self._inputs[id];setTimeout(function(){qq.remove(iframe);},1);});form.submit();qq.remove(form);return id;}});qq.extend(qq.UploadHandlerXhr.prototype,{uploadAll:function(params){this._uploadAll(params);},getName:function(id){var file=this._files[id];var name=document.getElementById('mediamanager__upload_item'+id);if(name!=null){return name.value;}else{if(file!=null){return file.fileName!=null?file.fileName:file.name;}else{return null;}}},getSize:function(id){var file=this._files[id];if(file==null)return null;return file.fileSize!=null?file.fileSize:file.size;},_upload:function(id,params){var file=this._files[id],name=this.getName(id),size=this.getSize(id);if(name==null||size==null)return;this._loaded[id]=0;var xhr=this._xhrs[id]=new XMLHttpRequest();var self=this;xhr.upload.onprogress=function(e){if(e.lengthComputable){self._loaded[id]=e.loaded;self._options.onProgress(id,name,e.loaded,e.total);}};xhr.onreadystatechange=function(){if(xhr.readyState==4){self._onComplete(id,xhr);}};params=params||{};params['qqfile']=name;params['ow']=jQuery('.dw__ow').is(':checked');var queryString=qq.obj2url(params,this._options.action);xhr.open("POST",queryString,true);xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");xhr.setRequestHeader("X-File-Name",encodeURIComponent(name));xhr.setRequestHeader("Content-Type","application/octet-stream");xhr.send(file);},_uploadAll:function(params){jQuery(".qq-upload-spinner").each(function(i){jQuery(this).removeClass('hidden');});for(key in this._files){this.upload(key,params);}}});function substr_replace(str,replace,start,length){var a2,b1;a2=(start<0?str.length:0)+start;if(typeof length==='undefined'){length=str.length-a2;}else if(length<0&&start<0&&length<=start){length=0;}b1=(length<0?str.length:a2)+length;return str.substring(0,a2)+replace+str.substring(b1);}function bind(fnc){var Aps=Array.prototype.slice,static_args=Aps.call(arguments,1);return function(){return fnc.apply(this,static_args.concat(Aps.call(arguments,0)));};}function logError(e,file){if(window.console&&console.error){console.error('The error "%s: %s" occurred in file "%s". '+'If this is in a plugin try updating or disabling the plugin, '+'if this is in a template try updating the template or switching to the "dokuwiki" template.',e.name,e.message,file);if(e.stack){console.error(e.stack);}}}var timer={_cur_id:0,_handlers:{},execDispatch:function(id){timer._handlers[id]();},add:function(func,timeout){var id=++timer._cur_id;timer._handlers[id]=func;return window.setTimeout('timer.execDispatch('+id+')',timeout);}};function Delay(func,timeout){this.func=func;if(timeout){this.timeout=timeout;}}Delay.prototype={func:null,timeout:500,delTimer:function(){if(this.timer!==null){window.clearTimeout(this.timer);this.timer=null;}},start:function(){DEPRECATED('don\'t use the Delay object, use window.timeout with a callback instead');this.delTimer();var _this=this;this.timer=timer.add(function(){_this.exec.call(_this);},this.timeout);this._data={_this:arguments[0],_params:Array.prototype.slice.call(arguments,2)};},exec:function(){this.delTimer();this.func.call(this._data._this,this._data._params);}};var DokuCookie={data:{},name:'DOKU_PREFS',setValue:function(key,val){var text=[],_this=this;this.init();if(val===false){delete this.data[key];}else{val=val+"";this.data[key]=val;}jQuery.each(_this.data,function(key,val){if(_this.data.hasOwnProperty(key)){text.push(encodeURIComponent(key)+'#'+encodeURIComponent(val));}});jQuery.cookie(this.name,text.join('#'),{expires:365,path:DOKU_COOKIE_PARAM.path,secure:DOKU_COOKIE_PARAM.secure});},getValue:function(key,def){this.init();return this.data.hasOwnProperty(key)?this.data[key]:def;},init:function(){var text,parts,i;if(!jQuery.isEmptyObject(this.data)){return;}text=jQuery.cookie(this.name);if(text){parts=text.split('#');for(i=0;i<parts.length;i+=2){this.data[decodeURIComponent(parts[i])]=decodeURIComponent(parts[i+1]);}}}};if('function'===typeof jQuery&&'function'===typeof jQuery.noConflict){jQuery.noConflict();}var clientPC=navigator.userAgent.toLowerCase();var is_macos=navigator.appVersion.indexOf('Mac')!=-1;var is_gecko=((clientPC.indexOf('gecko')!=-1)&&(clientPC.indexOf('spoofer')==-1)&&(clientPC.indexOf('khtml')==-1)&&(clientPC.indexOf('netscape/7.0')==-1));var is_safari=((clientPC.indexOf('applewebkit')!=-1)&&(clientPC.indexOf('spoofer')==-1));var is_khtml=(navigator.vendor=='KDE'||(document.childNodes&&!document.all&&!navigator.taintEnabled));if(clientPC.indexOf('opera')!=-1){var is_opera=true;var is_opera_preseven=(window.opera&&!document.childNodes);var is_opera_seven=(window.opera&&document.childNodes);}function closePopups(){jQuery('div.JSpopup').hide();}jQuery(function(){jQuery(document).on('click',closePopups);});jQuery.fn.dw_qsearch=function(overrides){var dw_qsearch={output:'#qsearch__out',$inObj:this,$outObj:null,timer:null,curRequest:null,init:function(){var do_qsearch;dw_qsearch.$outObj=jQuery(dw_qsearch.output);if(dw_qsearch.$inObj.length===0||dw_qsearch.$outObj.length===0){return;}do_qsearch=function(){if(dw_qsearch.curRequest!=null){dw_qsearch.curRequest.abort();}var value=dw_qsearch.getSearchterm();if(value===''){dw_qsearch.clear_results();return;}dw_qsearch.$inObj.parents('form').addClass('searching');dw_qsearch.curRequest=jQuery.post(DOKU_BASE+'lib/exe/ajax.php',{call:'qsearch',q:encodeURI(value)},dw_qsearch.onCompletion,'html');};dw_qsearch.$inObj.on('keyup',function(){if(dw_qsearch.timer){window.clearTimeout(dw_qsearch.timer);dw_qsearch.timer=null;}dw_qsearch.timer=window.setTimeout(do_qsearch,500);});dw_qsearch.$outObj.on('click',dw_qsearch.clear_results);},getSearchterm:function(){return dw_qsearch.$inObj.val();},clear_results:function(){dw_qsearch.$inObj.parents('form').removeClass('searching');dw_qsearch.$outObj.hide();dw_qsearch.$outObj.text('');},onCompletion:function(data){var max,$links,too_big;dw_qsearch.$inObj.parents('form').removeClass('searching');dw_qsearch.curRequest=null;if(data===''){dw_qsearch.clear_results();return;}dw_qsearch.$outObj .html(data).show().css('white-space','nowrap');dw_qsearch.$outObj.find('li').css('overflow','visible');$links=dw_qsearch.$outObj.find('a');max=dw_qsearch.$outObj[0].clientWidth;if(document.documentElement.dir==='rtl'){max-=parseInt(dw_qsearch.$outObj.css('padding-left'));too_big=function(l){return l.offsetLeft<0;};}else{max-=parseInt(dw_qsearch.$outObj.css('padding-right'));too_big=function(l){return l.offsetWidth+l.offsetLeft>max;};}$links.each(function(){var start,length,replace,nsL,nsR,eli,runaway;if(!too_big(this)){return;}nsL=this.textContent.indexOf('(');nsR=this.textContent.indexOf(')');eli=0;runaway=0;while((nsR-nsL>3)&&too_big(this)&&runaway++<500){if(eli!==0){if((eli-nsL)>(nsR-eli)){start=eli-2;length=2;}else{start=eli+1;length=1;}replace='';}else{start=Math.floor(nsL+((nsR-nsL)/2));length=1;replace='…';}this.textContent=substr_replace(this.textContent,replace,start,length);eli=this.textContent.indexOf('…');nsL=this.textContent.indexOf('(');nsR=this.textContent.indexOf(')');}});dw_qsearch.$outObj.find('li').css('overflow','hidden').css('text-overflow','ellipsis');}};jQuery.extend(dw_qsearch,overrides);if(!overrides.deferInit){dw_qsearch.init();}return dw_qsearch;};jQuery(function(){jQuery('#qsearch__in').dw_qsearch({output:'#qsearch__out'});});jQuery(function(){'use strict';var $searchForm=jQuery('.search-results-form');if(!$searchForm.length){return;}var $toggleAssistanceButton=jQuery('<button>').addClass('toggleAssistant').attr('type','button').attr('aria-expanded','false').text(LANG.search_toggle_tools).prependTo($searchForm.find('fieldset'));$toggleAssistanceButton.on('click',function(){jQuery('.advancedOptions').toggle(0,function(){var $me=jQuery(this);if($me.attr('aria-hidden')){$me.removeAttr('aria-hidden');$toggleAssistanceButton.attr('aria-expanded','true');DokuCookie.setValue('sa','on');}else{$me.attr('aria-hidden','true');$toggleAssistanceButton.attr('aria-expanded','false');DokuCookie.setValue('sa','off');}});});if(DokuCookie.getValue('sa')==='on'){$toggleAssistanceButton.trigger('click');}$searchForm.find('.advancedOptions .toggle div.current').on('click',function(){var $me=jQuery(this);$me.parent().siblings().removeClass('open');$me.parent().siblings().find('ul:first').attr('aria-expanded','false');$me.parent().toggleClass('open');if($me.parent().hasClass('open')){$me.parent().find('ul:first').attr('aria-expanded','true');}else{$me.parent().find('ul:first').attr('aria-expanded','false');}});});jQuery.fn.dw_tree=function(overrides){var dw_tree={throbber_delay:500,$obj:this,toggle_selector:'a.idx_dir',init:function(){this.$obj.on('click',this.toggle_selector,this,this.toggle);jQuery('ul:first',this.$obj).attr('role','tree');jQuery('ul',this.$obj).not(':first').attr('role','group');jQuery('li',this.$obj).attr('role','treeitem');jQuery('li.open > ul',this.$obj).attr('aria-expanded','true');jQuery('li.closed > ul',this.$obj).attr('aria-expanded','false');jQuery('li.closed',this.$obj).attr('aria-live','assertive');},toggle:function(e){var $listitem,$sublist,timeout,$clicky,show_sublist,dw_tree,opening;e.preventDefault();dw_tree=e.data;$clicky=jQuery(this);$listitem=$clicky.closest('li');$sublist=$listitem.find('ul').first();opening=$listitem.hasClass('closed');dw_tree.toggle_display($clicky,opening);if($sublist.is(':visible')){$listitem.removeClass('open').addClass('closed');$sublist.attr('aria-expanded','false');}else{$listitem.removeClass('closed').addClass('open');$sublist.attr('aria-expanded','true');}if(!opening){$sublist.dw_hide();return;}show_sublist=function(data){$sublist.hide();if(typeof data!=='undefined'){$sublist.html(data);$sublist.parent().attr('aria-busy','false').removeAttr('aria-live');jQuery('li.closed',$sublist).attr('aria-live','assertive');}if($listitem.hasClass('open')){$sublist.dw_show();}};if($sublist.length>0){show_sublist();return;}$sublist=jQuery('<ul class="idx" role="group"/>');$listitem.append($sublist);timeout=window.setTimeout(bind(show_sublist,'<li aria-busy="true"><img src="'+DOKU_BASE+'lib/images/throbber.gif" alt="loading..." title="loading..." /></li>'),dw_tree.throbber_delay);dw_tree.load_data(function(data){window.clearTimeout(timeout);show_sublist(data);},$clicky);},toggle_display:function($clicky,opening){},load_data:function(show_data,$clicky){show_data();}};jQuery.extend(dw_tree,overrides);if(!overrides.deferInit){dw_tree.init();}return dw_tree;};var dw_index=jQuery('#index__tree').dw_tree({deferInit:true,load_data:function(show_sublist,$clicky){jQuery.post(DOKU_BASE+'lib/exe/ajax.php',$clicky[0].search.substr(1)+'&call=index',show_sublist,'html');}});jQuery(function(){var $tree=jQuery('#index__tree');dw_index.$obj=$tree;dw_index.init();});function selection_class(){this.start=0;this.end=0;this.obj=null;this.scroll=0;this.fix=0;this.getLength=function(){return this.end-this.start;};this.getText=function(){return(!this.obj)?'':this.obj.value.substring(this.start,this.end);};}function DWgetSelection(textArea){var sel=new selection_class();textArea.focus();sel.obj=textArea;sel.start=textArea.selectionStart;sel.end=textArea.selectionEnd;sel.scroll=textArea.scrollTop;return sel;}function DWsetSelection(selection){selection.obj.setSelectionRange(selection.start,selection.end);if(selection.scroll)selection.obj.scrollTop=selection.scroll;}function pasteText(selection,text,opts){if(!opts)opts={};selection.obj.value=selection.obj.value.substring(0,selection.start)+text+selection.obj.value.substring(selection.end,selection.obj.value.length);if(is_opera){selection.end=selection.start+text.replace(/\r?\n/g,'\r\n').length;}else{selection.end=selection.start+text.length;}if(opts.startofs)selection.start+=opts.startofs;if(opts.endofs)selection.end-=opts.endofs;if(opts.nosel)selection.start=selection.end;DWsetSelection(selection);}function insertTags(textAreaID,tagOpen,tagClose,sampleText){var txtarea=jQuery('#'+textAreaID)[0];var selection=DWgetSelection(txtarea);var text=selection.getText();var opts;if(text.charAt(text.length-1)==' '){selection.end--;text=selection.getText();}if(!text){text=sampleText;opts={startofs:tagOpen.length,endofs:tagClose.length};}else{opts={nosel:true};}text=tagOpen+text+tagClose;pasteText(selection,text,opts);}function insertAtCarret(textAreaID,text){var txtarea=jQuery('#'+textAreaID)[0];var selection=DWgetSelection(txtarea);pasteText(selection,text,{nosel:true});}var pickercounter=0;function initToolbar(tbid,edid,tb,allowblock){var $toolbar,$edit;if(typeof tbid=='string'){$toolbar=jQuery('#'+tbid);}else{$toolbar=jQuery(tbid);}$edit=jQuery('#'+edid);if($toolbar.length==0||$edit.length==0||$edit.attr('readOnly')){return;}if(typeof allowblock==='undefined'){allowblock=true;}$toolbar.html('');jQuery.each(tb,function(k,val){if(!tb.hasOwnProperty(k)||(!allowblock&&val.block===true)){return;}var actionFunc,$btn;$btn=jQuery(createToolButton(val.icon,val.title,val.key,val.id,val['class']));actionFunc='tb_'+val.type;if(jQuery.isFunction(window[actionFunc])){$btn.on('click',bind(window[actionFunc],$btn,val,edid));$toolbar.append($btn);return;}actionFunc='addBtnAction'+val.type.charAt(0).toUpperCase()+val.type.substring(1);if(jQuery.isFunction(window[actionFunc])){var pickerid=window[actionFunc]($btn,val,edid);if(pickerid!==''){$toolbar.append($btn);$btn.attr('aria-controls',pickerid);if(actionFunc==='addBtnActionPicker'){$btn.attr('aria-haspopup','true');}}return;}alert('unknown toolbar type: '+val.type+' '+actionFunc);});}function tb_format(btn,props,edid){var sample=props.sample||props.title;insertTags(edid,fixtxt(props.open),fixtxt(props.close),fixtxt(sample));pickerClose();return false;}function tb_formatln(btn,props,edid){var sample=props.sample||props.title,opts,selection=DWgetSelection(jQuery('#'+edid)[0]);sample=fixtxt(sample);props.open=fixtxt(props.open);props.close=fixtxt(props.close);if(selection.getLength()){sample=selection.getText();opts={nosel:true};}else{opts={startofs:props.open.length,endofs:props.close.length};}sample=sample.split("\n").join(props.close+"\n"+props.open);sample=props.open+sample+props.close;pasteText(selection,sample,opts);pickerClose();return false;}function tb_insert(btn,props,edid){insertAtCarret(edid,fixtxt(props.insert));pickerClose();return false;}function tb_mediapopup(btn,props,edid){window.open(DOKU_BASE+props.url+encodeURIComponent(NS)+'&edid='+encodeURIComponent(edid),props.name,props.options);return false;}function tb_autohead(btn,props,edid){var lvl=currentHeadlineLevel(edid),tags;lvl+=props.mod;if(lvl<1)lvl=1;if(lvl>5)lvl=5;tags=(new Array(8-lvl)).join('=');insertTags(edid,tags+' ',' '+tags+"\n",props.text);pickerClose();return false;}function addBtnActionPicker($btn,props,edid){var pickerid='picker'+(pickercounter++);var picker=createPicker(pickerid,props,edid);jQuery(picker).attr('aria-hidden','true');$btn.click(function(e){pickerToggle(pickerid,$btn);e.preventDefault();return'';});return pickerid;}function addBtnActionLinkwiz($btn,props,edid){dw_linkwiz.init(jQuery('#'+edid));jQuery($btn).click(function(e){dw_linkwiz.val=props;dw_linkwiz.toggle();e.preventDefault();return'';});return'link__wiz';}function pickerToggle(pickerid,$btn){var $picker=jQuery('#'+pickerid),pos=$btn.offset();if($picker.hasClass('a11y')){$picker.removeClass('a11y').attr('aria-hidden','false');}else{$picker.addClass('a11y').attr('aria-hidden','true');}var picker_left=pos.left+3,picker_width=$picker.width(),window_width=jQuery(window).width();if(picker_width>300){$picker.css("max-width","300");picker_width=300;}if((picker_left+picker_width+40)>window_width){picker_left=window_width-picker_width-40;}if(picker_left<0){picker_left=0;}$picker.offset({left:picker_left,top:pos.top+$btn[0].offsetHeight+3});}function pickerClose(){jQuery('.picker').addClass('a11y');}function fixtxt(str){return str.replace(/\\n/g,"\n");}jQuery(function(){initToolbar('tool__bar','wiki__text',toolbar);jQuery('#tool__bar').attr('role','toolbar');});function createToolButton(icon,label,key,id,classname){var $btn=jQuery(document.createElement('button')),$ico=jQuery(document.createElement('img'));$btn.addClass('toolbutton');if(classname){$btn.addClass(classname);}$btn.attr('title',label).attr('aria-controls','wiki__text');if(key){$btn.attr('title',label+' ['+key.toUpperCase()+']').attr('accessKey',key);}if(id){$btn.attr('id',id);$ico.attr('id',id+'_ico');}if(icon.substr(0,1)!=='/'){icon=DOKU_BASE+'lib/images/toolbar/'+icon;}$ico.attr('src',icon);$ico.attr('alt','');$ico.attr('width',16);$ico.attr('height',16);$btn.append($ico);return $btn[0];}function createPicker(id,props,edid){var $picker=jQuery(document.createElement('div'));$picker.addClass('picker a11y');if(props['class']){$picker.addClass(props['class']);}$picker.attr('id',id).css('position','absolute');function $makebutton(title){var $btn=jQuery(document.createElement('button')).addClass('pickerbutton').attr('title',title).attr('aria-controls',edid).on('click',bind(pickerInsert,title,edid)).appendTo($picker);return $btn;}jQuery.each(props.list,function(key,item){if(!props.list.hasOwnProperty(key)){return;}if(isNaN(key)){if(item.substr(0,1)!=='/'){item=DOKU_BASE+'lib/images/'+props.icobase+'/'+item;}jQuery(document.createElement('img')).attr('src',item).attr('alt','').css('height','16').appendTo($makebutton(key));}else if(typeof item=='string'){$makebutton(item).text(item);}else{initToolbar($picker,edid,props.list);return false;}});jQuery('body').append($picker);return $picker[0];}function pickerInsert(text,edid){insertAtCarret(edid,text);pickerClose();}function addBtnActionSignature($btn,props,edid){if(typeof SIG!='undefined'&&SIG!=''){$btn.on('click',function(e){insertAtCarret(edid,SIG);e.preventDefault();});return edid;}return'';}function currentHeadlineLevel(textboxId){var field=jQuery('#'+textboxId)[0],s=false,opts=[field.value.substr(0,DWgetSelection(field).start)];if(field.form&&field.form.prefix){opts.push(field.form.prefix.value);}jQuery.each(opts,function(_,opt){var str="\n"+opt,lasthl=str.lastIndexOf("\n==");if(lasthl!==-1){s=str.substr(lasthl+1,6);return false;}});if(s===false){return 0;}return 7-s.match(/^={2,6}/)[0].length;}window.textChanged=false;window.doku_edit_text_content='';function deleteDraft(){if(is_opera||window.keepDraft){return;}var $dwform=jQuery('#dw__editform');if($dwform.length===0){return;}jQuery.post(DOKU_BASE+'lib/exe/ajax.php',{call:'draftdel',id:$dwform.find('input[name=id]').val(),sectok:$dwform.find('input[name=sectok]').val()});}jQuery(function(){var $editform=jQuery('#dw__editform');if($editform.length==0){return;}var $edit_text=jQuery('#wiki__text');if($edit_text.length>0){if($edit_text.attr('readOnly')){return;}var sel=DWgetSelection($edit_text[0]);sel.start=0;sel.end=0;DWsetSelection(sel);$edit_text.trigger('focus');doku_edit_text_content=$edit_text.val();}var changeHandler=function(){doku_hasTextBeenModified();doku_summaryCheck();};$editform.change(changeHandler);$editform.keydown(changeHandler);window.onbeforeunload=function(){if(window.textChanged){return LANG.notsavedyet;}};window.onunload=deleteDraft;jQuery('#edbtn__save').on('click',function(){window.onbeforeunload='';textChanged=false;});jQuery('#edbtn__preview').on('click',function(){window.onbeforeunload='';textChanged=false;window.keepDraft=true;});var $summary=jQuery('#edit__summary');$summary.on('change keyup',doku_summaryCheck);if(textChanged)doku_summaryCheck();});function doku_hasTextBeenModified(){if(!textChanged){var $edit_text=jQuery('#wiki__text');if($edit_text.length>0){textChanged=doku_edit_text_content!=$edit_text.val();}else{textChanged=true;}}}function doku_summaryCheck(){var $sum=jQuery('#edit__summary'),missing=$sum.val()==='';$sum.toggleClass('missing',missing).toggleClass('edit',!missing);}var dw_editor={init:function(){var $editor=jQuery('#wiki__text');if($editor.length===0){return;}dw_editor.initSizeCtl('#size__ctl',$editor);if($editor.attr('readOnly')){return;}$editor.keydown(dw_editor.keyHandler);},initSizeCtl:function(ctlarea,editor){var $ctl=jQuery(ctlarea),$textarea=jQuery(editor);if($ctl.length===0||$textarea.length===0){return;}$textarea.css('height',DokuCookie.getValue('sizeCtl')||'300px');var wrp=DokuCookie.getValue('wrapCtl');if(wrp){dw_editor.setWrap($textarea[0],wrp);}jQuery.each([['larger',function(){dw_editor.sizeCtl(editor,100);}],['smaller',function(){dw_editor.sizeCtl(editor,-100);}],['wrap',function(){dw_editor.toggleWrap(editor);}]],function(_,img){jQuery(document.createElement('img')).attr('src',DOKU_BASE+'lib/images/'+img[0]+'.gif').attr('alt','').on('click',img[1]).appendTo($ctl);});},sizeCtl:function(editor,val){var $textarea=jQuery(editor),height=parseInt($textarea.css('height'))+val;$textarea.css('height',height+'px');DokuCookie.setValue('sizeCtl',$textarea.css('height'));},toggleWrap:function(editor){var $textarea=jQuery(editor),wrap=$textarea.attr('wrap');dw_editor.setWrap($textarea[0],(wrap&&wrap.toLowerCase()=='off')?'soft':'off');DokuCookie.setValue('wrapCtl',$textarea.attr('wrap'));},setWrap:function(textarea,wrapAttrValue){textarea.setAttribute('wrap',wrapAttrValue);var parNod=textarea.parentNode;var nxtSib=textarea.nextSibling;parNod.removeChild(textarea);parNod.insertBefore(textarea,nxtSib);},keyHandler:function(e){if(jQuery.inArray(e.keyCode,[8,10,13,32])===-1){return;}var selection=DWgetSelection(this);if(selection.getLength()>0){return;}var search="\n"+this.value.substr(0,selection.start);var linestart=Math.max(search.lastIndexOf("\n"),search.lastIndexOf("\r"));search=search.substr(linestart);if((e.keyCode==13||e.keyCode==10)&&e.ctrlKey){jQuery('#edbtn__save').trigger('click');e.preventDefault();return false;}else if(e.keyCode==13){var match=search.match(/(\n +([\*-] ?)?)/);if(match){var scroll=this.scrollHeight;var match2=search.match(/^\n +[\*-]\s*$/);if(match2&&this.value.substr(selection.start).match(/^($|\r?\n)/)){this.value=this.value.substr(0,linestart)+"\n"+this.value.substr(selection.start);selection.start=linestart+1;selection.end=linestart+1;DWsetSelection(selection);}else{insertAtCarret(this.id,match[1]);}this.scrollTop+=(this.scrollHeight-scroll);e.preventDefault();return false;}}else if(e.keyCode==8){var match=search.match(/(\n +)([*-] ?)$/);if(match){var spaces=match[1].length-1;if(spaces>3){this.value=this.value.substr(0,linestart)+this.value.substr(linestart+2);selection.start=selection.start-2;selection.end=selection.start;}else{this.value=this.value.substr(0,linestart)+this.value.substr(selection.start);selection.start=linestart;selection.end=linestart;}DWsetSelection(selection);e.preventDefault();return false;}}else if(e.keyCode==32){var match=search.match(/(\n +)([*-] )$/);if(match){this.value=this.value.substr(0,linestart)+' '+this.value.substr(linestart);selection.start=selection.start+2;selection.end=selection.start;DWsetSelection(selection);e.preventDefault();return false;}}}};jQuery(dw_editor.init);var dw_locktimer={timeout:0,draft:false,timerID:null,lasttime:null,msg:LANG.willexpire,pageid:'',fieldsToSaveAsDraft:['input[name=prefix]','textarea[name=wikitext]','input[name=suffix]','input[name=date]',],callbacks:[],init:function(timeout,draft,edid){var $edit;edid=edid||'wiki__text';$edit=jQuery('#'+edid);if($edit.length===0||$edit.attr('readonly')){return;}dw_locktimer.timeout=timeout*1000;dw_locktimer.draft=draft;dw_locktimer.lasttime=new Date();dw_locktimer.pageid=jQuery('#dw__editform').find('input[name=id]').val();if(!dw_locktimer.pageid){return;}$edit.keypress(dw_locktimer.refresh);dw_locktimer.reset();},addField:function(selector){dw_locktimer.fieldsToSaveAsDraft.push(selector);},addRefreshCallback:function(callback){dw_locktimer.callbacks.push(callback);},reset:function(){dw_locktimer.clear();dw_locktimer.timerID=window.setTimeout(dw_locktimer.warning,dw_locktimer.timeout);},warning:function(){dw_locktimer.clear();alert(fixtxt(dw_locktimer.msg));},clear:function(){if(dw_locktimer.timerID!==null){window.clearTimeout(dw_locktimer.timerID);dw_locktimer.timerID=null;}},refresh:function(){var now=new Date(),params='call=lock&id='+dw_locktimer.pageid+'&';if(now.getTime()-dw_locktimer.lasttime.getTime()<=30*1000){return;}if(dw_locktimer.draft&&jQuery('#dw__editform').find('textarea[name=wikitext]').length>0){params+=jQuery('#dw__editform').find(dw_locktimer.fieldsToSaveAsDraft.join(', ')).serialize();}jQuery.post(DOKU_BASE+'lib/exe/ajax.php',params,null,'json').done(function dwLocktimerRefreshDoneHandler(data){dw_locktimer.callbacks.forEach(function(callback){callback(data);});});dw_locktimer.lasttime=now;},refreshed:function(data){if(data.errors.length){data.errors.forEach(function(error){jQuery('#draft__status').after(jQuery('<div class="error"></div>').text(error));})}jQuery('#draft__status').html(data.draft);if(data.lock!=='1'){return;}dw_locktimer.reset();}};dw_locktimer.callbacks.push(dw_locktimer.refreshed);var dw_linkwiz={$wiz:null,$entry:null,result:null,timer:null,textArea:null,selected:null,selection:null,init:function($editor){var pos=$editor.position();if(dw_linkwiz.$wiz)return;dw_linkwiz.$wiz=jQuery(document.createElement('div')).dialog({autoOpen:false,draggable:true,title:LANG.linkwiz,resizable:false}).html('<div>'+LANG.linkto+' <input type="text" class="edit" id="link__wiz_entry" autocomplete="off" /></div>'+'<div id="link__wiz_result"></div>').parent().attr('id','link__wiz').css({'position':'absolute','top':(pos.top+20)+'px','left':(pos.left+80)+'px'}).hide().appendTo('.dokuwiki:first');dw_linkwiz.textArea=$editor[0];dw_linkwiz.result=jQuery('#link__wiz_result')[0];jQuery(dw_linkwiz.result).css('position','relative');dw_linkwiz.$entry=jQuery('#link__wiz_entry');if(JSINFO.namespace){dw_linkwiz.$entry.val(JSINFO.namespace+':');}jQuery('#link__wiz .ui-dialog-titlebar-close').on('click',dw_linkwiz.hide);dw_linkwiz.$entry.keyup(dw_linkwiz.onEntry);jQuery(dw_linkwiz.result).on('click','a',dw_linkwiz.onResultClick);},onEntry:function(e){if(e.keyCode==37||e.keyCode==39){return true;}if(e.keyCode==27){dw_linkwiz.hide();e.preventDefault();e.stopPropagation();return false;}if(e.keyCode==38){dw_linkwiz.select(dw_linkwiz.selected-1);e.preventDefault();e.stopPropagation();return false;}if(e.keyCode==40){dw_linkwiz.select(dw_linkwiz.selected+1);e.preventDefault();e.stopPropagation();return false;}if(e.keyCode==13){if(dw_linkwiz.selected>-1){var $obj=dw_linkwiz.$getResult(dw_linkwiz.selected);if($obj.length>0){dw_linkwiz.resultClick($obj.find('a')[0]);}}else if(dw_linkwiz.$entry.val()){dw_linkwiz.insertLink(dw_linkwiz.$entry.val());}e.preventDefault();e.stopPropagation();return false;}dw_linkwiz.autocomplete();},getResult:function(num){DEPRECATED('use dw_linkwiz.$getResult()[0] instead');return dw_linkwiz.$getResult()[0]||null;},$getResult:function(num){return jQuery(dw_linkwiz.result).find('div').eq(num);},select:function(num){if(num<0){dw_linkwiz.deselect();return;}var $obj=dw_linkwiz.$getResult(num);if($obj.length===0){return;}dw_linkwiz.deselect();$obj.addClass('selected');var childPos=$obj.position().top;var yDiff=childPos+$obj.outerHeight()-jQuery(dw_linkwiz.result).innerHeight();if(childPos<0){jQuery(dw_linkwiz.result)[0].scrollTop+=childPos;}else if(yDiff>0){jQuery(dw_linkwiz.result)[0].scrollTop+=yDiff;}dw_linkwiz.selected=num;},deselect:function(){if(dw_linkwiz.selected>-1){dw_linkwiz.$getResult(dw_linkwiz.selected).removeClass('selected');}dw_linkwiz.selected=-1;},onResultClick:function(e){if(!jQuery(this).is('a')){return;}e.stopPropagation();e.preventDefault();dw_linkwiz.resultClick(this);return false;},resultClick:function(a){dw_linkwiz.$entry.val(a.title);if(a.title==''||a.title.substr(a.title.length-1)==':'){dw_linkwiz.autocomplete_exec();}else{if(jQuery(a.nextSibling).is('span')){dw_linkwiz.insertLink(a.nextSibling.innerHTML);}else{dw_linkwiz.insertLink('');}}},insertLink:function(title){var link=dw_linkwiz.$entry.val(),sel,stxt;if(!link){return;}sel=DWgetSelection(dw_linkwiz.textArea);if(sel.start==0&&sel.end==0){sel=dw_linkwiz.selection;}stxt=sel.getText();if(stxt.charAt(stxt.length-1)==' '){sel.end--;stxt=sel.getText();}if(!stxt&&!DOKU_UHC){stxt=title;}if(dw_linkwiz.textArea.form.id.value.indexOf(':')!=-1&&link.indexOf(':')==-1){link=':'+link;}var so=link.length;var eo=0;if(dw_linkwiz.val){if(dw_linkwiz.val.open){so+=dw_linkwiz.val.open.length;link=dw_linkwiz.val.open+link;}link+='|';so+=1;if(stxt){link+=stxt;}if(dw_linkwiz.val.close){link+=dw_linkwiz.val.close;eo=dw_linkwiz.val.close.length;}}pasteText(sel,link,{startofs:so,endofs:eo});dw_linkwiz.hide();var externallinkpattern=new RegExp('^((f|ht)tps?:)?//','i'),entry_value;if(externallinkpattern.test(dw_linkwiz.$entry.val())){if(JSINFO.namespace){entry_value=JSINFO.namespace+':';}else{entry_value='';}}else{entry_value=dw_linkwiz.$entry.val().replace(/[^:]*$/,'')}dw_linkwiz.$entry.val(entry_value);},autocomplete:function(){if(dw_linkwiz.timer!==null){window.clearTimeout(dw_linkwiz.timer);dw_linkwiz.timer=null;}dw_linkwiz.timer=window.setTimeout(dw_linkwiz.autocomplete_exec,350);},autocomplete_exec:function(){var $res=jQuery(dw_linkwiz.result);dw_linkwiz.deselect();$res.html('<img src="'+DOKU_BASE+'lib/images/throbber.gif" alt="" width="16" height="16" />').load(DOKU_BASE+'lib/exe/ajax.php',{call:'linkwiz',q:dw_linkwiz.$entry.val()});},show:function(){dw_linkwiz.selection=DWgetSelection(dw_linkwiz.textArea);dw_linkwiz.$wiz.show();dw_linkwiz.$entry.focus();dw_linkwiz.autocomplete();var temp=dw_linkwiz.$entry.val();dw_linkwiz.$entry.val('');dw_linkwiz.$entry.val(temp);},hide:function(){dw_linkwiz.$wiz.hide();dw_linkwiz.textArea.focus();},toggle:function(){if(dw_linkwiz.$wiz.css('display')=='none'){dw_linkwiz.show();}else{dw_linkwiz.hide();}}};var dw_mediamanager={keepopen:false,hide:false,popup:false,display:false,ext:false,$popup:null,align:false,link:false,size:false,forbidden_opts:{},view_opts:{list:false,sort:false},layout_width:0,minHeights:{thumbs:200,rows:100},init:function(){var $content,$tree;$content=jQuery('#media__content');$tree=jQuery('#media__tree');if(!$tree.length)return;dw_mediamanager.prepare_content($content);dw_mediamanager.attachoptions();dw_mediamanager.initpopup();$content .on('change','#upload__file',dw_mediamanager.suggest).on('click','a.select',dw_mediamanager.select).on('click','#media__content a.btn_media_delete',dw_mediamanager.confirmattach).on('submit','#mediamanager__done_form',dw_mediamanager.list);$tree.dw_tree({toggle_selector:'img',load_data:function(show_sublist,$clicky){var $link=$clicky.parent().find('div.li a.idx_dir');jQuery.post(DOKU_BASE+'lib/exe/ajax.php',$link[0].search.substr(1)+'&call=medians',show_sublist,'html');},toggle_display:function($clicky,opening){$clicky.attr('src',DOKU_BASE+'lib/images/'+(opening?'minus':'plus')+'.gif');}});$tree.on('click','a',dw_mediamanager.list);dw_mediamanager.set_fileview_list();dw_mediamanager.init_options();dw_mediamanager.image_diff();dw_mediamanager.init_ajax_uploader();var $page=jQuery('#mediamanager__page');$page.find('div.filelist').on('click','ul.tabs a',dw_mediamanager.list).on('click','div.panelContent a',dw_mediamanager.details).on('submit','#dw__mediasearch',dw_mediamanager.list).on('change','#upload__file',dw_mediamanager.suggest).on('click','.qq-upload-file a',dw_mediamanager.details);$page.find('div.file').on('click','ul.tabs a',dw_mediamanager.details).on('submit','#mediamanager__btn_update',dw_mediamanager.list).on('submit','#page__revisions',dw_mediamanager.details).on('click','#page__revisions a',dw_mediamanager.details).on('submit','#mediamanager__save_meta',dw_mediamanager.details).on('submit','#mediamanager__btn_delete',dw_mediamanager.details).on('submit','#mediamanager__btn_restore',dw_mediamanager.details).on('submit','.btn_newer, .btn_older',dw_mediamanager.details);dw_mediamanager.resize();dw_mediamanager.update_resizable();dw_mediamanager.layout_width=$page.width();jQuery(window).on('resize',dw_mediamanager.window_resize);},init_options:function(){var $options=jQuery('div.filelist div.panelHeader form.options'),$listType,$sortBy,$both;if($options.length===0){return;}$listType=$options.find('li.listType');$sortBy=$options.find('li.sortBy');$both=$listType.add($sortBy);$options.find('button[type=submit]').parent().hide();$both.find('label').each(function(){var $this=jQuery(this);$this.children('input').appendTo($this.parent());});$both.find("input[type='radio']").checkboxradio({icon:false});$both.controlgroup();$listType.children('input').change(function(){dw_mediamanager.set_fileview_list();});$sortBy.children('input').change(function(event){dw_mediamanager.set_fileview_sort();dw_mediamanager.list.call(jQuery('#dw__mediasearch')[0]||this,event);});},initpopup:function(){var opts,$insp,$insbtn;dw_mediamanager.$popup=jQuery(document.createElement('div')).attr('id','media__popup_content').dialog({autoOpen:false,width:280,modal:true,draggable:true,title:LANG.mediatitle,resizable:false});opts=[{id:'link',label:LANG.mediatarget,btns:['lnk','direct','nolnk','displaylnk']},{id:'align',label:LANG.mediaalign,btns:['noalign','left','center','right']},{id:'size',label:LANG.mediasize,btns:['small','medium','large','original']}];jQuery.each(opts,function(_,opt){var $p,$l;$p=jQuery(document.createElement('p')).attr('id','media__'+opt.id);if(dw_mediamanager.display==="2"){$p.hide();}$l=jQuery(document.createElement('label')).text(opt.label);$p.append($l);jQuery.each(opt.btns,function(i,text){var $btn,$img;$btn=jQuery(document.createElement('button')).addClass('button').attr('id',"media__"+opt.id+"btn"+(i+1)).attr('title',LANG['media'+text]).on('click',bind(dw_mediamanager.setOpt,opt.id));$img=jQuery(document.createElement('img')).attr('src',DOKU_BASE+'lib/images/media_'+opt.id+'_'+text+'.png');$btn.append($img);$p.append($btn);});dw_mediamanager.$popup.append($p);});$insp=jQuery(document.createElement('p'));dw_mediamanager.$popup.append($insp);$insbtn=jQuery(document.createElement('input')).attr('id','media__sendbtn').attr('type','button').addClass('button').val(LANG.mediainsert);$insp.append($insbtn);},insert:function(id){var opts,cb,edid,s;dw_mediamanager.$popup.dialog('close');opts='';if({img:1,swf:1}[dw_mediamanager.ext]===1){if(dw_mediamanager.link==='4'){opts='?linkonly';}else{if(dw_mediamanager.link==="3"&&dw_mediamanager.ext==='img'){opts='?nolink';}else if(dw_mediamanager.link==="2"&&dw_mediamanager.ext==='img'){opts='?direct';}s=parseInt(dw_mediamanager.size,10);var size=s*200;if(s&&s>=1&&s<4){opts+=(opts.length)?'&':'?';opts+=size;if(dw_mediamanager.ext==='swf'){switch(s){case 1:opts+='x62';break;case 2:opts+='x123';break;case 3:opts+='x185';break;}}}}}edid=String.prototype.match.call(document.location,/&edid=([^&]+)/);edid=edid?edid[1]:'wiki__text';cb=String.prototype.match.call(document.location,/&onselect=([^&]+)/);cb=cb?cb[1].replace(/[^\w]+/,''):'dw_mediamanager_item_select';opener[cb](edid,id,opts,dw_mediamanager.align,dw_mediamanager.keepopen);if(!dw_mediamanager.keepopen){window.close();}opener.focus();return false;},suggest:function(){var $file,$name,text;$file=jQuery(this);$name=jQuery('#upload__name');if($name.val()!='')return;if(!$file.length||!$name.length){return;}text=$file.val();text=text.substr(text.lastIndexOf('/')+1);text=text.substr(text.lastIndexOf('\\')+1);$name.val(text);},list:function(event){var $link,$content,params;if(event){event.preventDefault();}jQuery('div.success, div.info, div.error, div.notify').remove();$link=jQuery(this);$content=jQuery('#media__content');if($content.length===0){$content=jQuery('div.filelist');if($link.hasClass('idx_dir')){jQuery('div.file').empty();jQuery('div.namespaces .selected').removeClass('selected');$link.addClass('selected');}}params='call=medialist&';if($link[0].search){params+=$link[0].search.substr(1);}else if($link.is('form')){params+=dw_mediamanager.form_params($link);}else if($link.closest('form').length>0){params+=dw_mediamanager.form_params($link.closest('form'));}dw_mediamanager.update_content($content,params);},form_params:function($form){if(!$form.length)return;var action='';var i=$form[0].action.indexOf('?');if(i>=0){action=$form[0].action.substr(i+1);}return action+'&'+$form.serialize();},set_fileview_list:function(new_type){dw_mediamanager.set_fileview_opt(['list','listType',function(new_type){jQuery('div.filelist div.panelContent ul').toggleClass('rows',new_type==='rows').toggleClass('thumbs',new_type==='thumbs');}],new_type);},set_fileview_sort:function(new_sort){dw_mediamanager.set_fileview_opt(['sort','sortBy',function(new_sort){}],new_sort);},set_fileview_opt:function(opt,new_val){if(typeof new_val==='undefined'){new_val=jQuery('form.options li.'+opt[1]+' input').filter(':checked').val();if(typeof new_val==='undefined'){new_val='thumbs';}}if(new_val!==dw_mediamanager.view_opts[opt[0]]){opt[2](new_val);DokuCookie.setValue(opt[0],new_val);dw_mediamanager.view_opts[opt[0]]=new_val;}},details:function(event){var $link,$content,params,update_list;$link=jQuery(this);event.preventDefault();jQuery('div.success, div.info, div.error, div.notify').remove();if($link[0].id=='mediamanager__btn_delete'&&!confirm(LANG.del_confirm)){return false;}if($link[0].id=='mediamanager__btn_restore'&&!confirm(LANG.restore_confirm)){return false;}$content=jQuery('div.file');params='call=mediadetails&';if($link[0].search){params+=$link[0].search.substr(1);}else if($link.is('form')){params+=dw_mediamanager.form_params($link);}else if($link.closest('form').length>0){params+=dw_mediamanager.form_params($link.closest('form'));}update_list=($link[0].id=='mediamanager__btn_delete'||$link[0].id=='mediamanager__btn_restore');dw_mediamanager.update_content($content,params,update_list);},update_content:function($content,params,update_list){var $container;jQuery.post(DOKU_BASE+'lib/exe/ajax.php',params,function(data){dw_mediamanager.$resizables().resizable('destroy');if(update_list){dw_mediamanager.list.call(jQuery('#mediamanager__page').find('form.options button[type="submit"]')[0]);}$content.html(data);dw_mediamanager.prepare_content($content);dw_mediamanager.updatehide();dw_mediamanager.update_resizable();dw_behaviour.revisionBoxHandler();dw_mediamanager.set_fileview_list(dw_mediamanager.view_opts.list);dw_mediamanager.image_diff();dw_mediamanager.init_ajax_uploader();dw_mediamanager.init_options();},'html');$container=$content.find('div.panelContent');if($container.length===0){$container=$content;}$container.html('<img src="'+DOKU_BASE+'lib/images/throbber.gif" alt="..." class="load" />');},window_resize:function(){dw_mediamanager.opacity_slider();dw_mediamanager.portions_slider();},$resizables:function(){return jQuery('#mediamanager__page').find('div.namespaces, div.filelist');},update_resizable:function(){var $resizables=dw_mediamanager.$resizables();$resizables.resizable({handles:(jQuery('html[dir=rtl]').length?'w':'e'),resize:function(event,ui){var $page=jQuery('#mediamanager__page');var widthFull=$page.width();var widthResizables=0;$resizables.each(function(){widthResizables+=jQuery(this).width();});var $filePanel=$page.find('div.panel.file');var widthOtherResizable=widthResizables-jQuery(this).width();var minWidthNonResizable=parseFloat($filePanel.css("min-width"));var maxWidth=widthFull-(widthOtherResizable+minWidthNonResizable)-1;$resizables.resizable("option","maxWidth",maxWidth);var relWidthNonResizable=99.9-(100*widthResizables/widthFull);$filePanel.width(relWidthNonResizable+'%');dw_mediamanager.opacity_slider();dw_mediamanager.portions_slider();}});},resize:function(){jQuery('#mediamanager__page').find('div.panelContent').css('height','60vh');},image_diff:function(){if(jQuery('#mediamanager__difftype').length)return;var $form=jQuery('#mediamanager__form_diffview');if(!$form.length)return;var $label=jQuery(document.createElement('label'));$label.append('<span>'+LANG.media_diff+'</span> ');var $select=jQuery(document.createElement('select')).attr('id','mediamanager__difftype').attr('name','difftype').change(dw_mediamanager.change_diff_type);$select.append(new Option(LANG.media_diff_both,"both"));$select.append(new Option(LANG.media_diff_opacity,"opacity"));$select.append(new Option(LANG.media_diff_portions,"portions"));$label.append($select);$form.append($label);var select=document.getElementById('mediamanager__difftype');select.options[0].text=LANG.media_diff_both;select.options[1].text=LANG.media_diff_opacity;select.options[2].text=LANG.media_diff_portions;},change_diff_type:function(){var $select=jQuery('#mediamanager__difftype');var $content=jQuery('#mediamanager__diff');var params=dw_mediamanager.form_params($select.closest('form'))+'&call=mediadiff';jQuery.post(DOKU_BASE+'lib/exe/ajax.php',params,function(data){$content.html(data);dw_mediamanager.portions_slider();dw_mediamanager.opacity_slider();},'html');},opacity_slider:function(){var $diff=jQuery("#mediamanager__diff");var $slider=$diff.find("div.slider");if(!$slider.length)return;var $image=$diff.find('div.imageDiff.opacity div.image1 img');if(!$image.length)return;$slider.width($image.width()-20);$slider.slider();$slider.slider("option","min",0);$slider.slider("option","max",0.999);$slider.slider("option","step",0.001);$slider.slider("option","value",0.5);$slider.on("slide",function(event,ui){jQuery('#mediamanager__diff').find('div.imageDiff.opacity div.image2 img').css({opacity:$slider.slider("option","value")});});},portions_slider:function(){var $diff=jQuery("#mediamanager__diff");if(!$diff.length)return;var $image1=$diff.find('div.imageDiff.portions div.image1 img');var $image2=$diff.find('div.imageDiff.portions div.image2 img');if(!$image1.length||!$image2.length)return;$diff.width('100%');$image2.parent().width('97%');$image1.width('100%');$image2.width('100%');if($image1.width()<$diff.width()){$diff.width($image1.width());}$image2.parent().width('50%');$image2.width($image1.width());$image1.width($image1.width());var $slider=$diff.find("div.slider");if(!$slider.length)return;$slider.width($image1.width()-20);$slider.slider();$slider.slider("option","min",0);$slider.slider("option","max",97);$slider.slider("option","step",1);$slider.slider("option","value",50);$slider.on("slide",function(event,ui){jQuery('#mediamanager__diff').find('div.imageDiff.portions div.image2').css({width:$slider.slider("option","value")+'%'});});},params_toarray:function(str){var vars=[],hash;var hashes=str.split('&');for(var i=0;i<hashes.length;i++){hash=hashes[i].split('=');vars[decodeURIComponent(hash[0])]=decodeURIComponent(hash[1]);}return vars;},init_ajax_uploader:function(){if(!jQuery('#mediamanager__uploader').length)return;if(jQuery('.qq-upload-list').length)return;var params=dw_mediamanager.form_params(jQuery('#dw__upload'))+'&call=mediaupload';params=dw_mediamanager.params_toarray(params);var uploader=new qq.FileUploaderExtended({element:document.getElementById('mediamanager__uploader'),action:DOKU_BASE+'lib/exe/ajax.php',params:params});},prepare_content:function($content){$content.find('div.example:visible').hide();$content.find('a.allowedmime').on('click',function(event){event.preventDefault();$toggle=jQuery(this);$list=$toggle.next('span');$list.toggle();}).next('span').hide();},select:function(event){var $link,id,dot,ext;event.preventDefault();$link=jQuery(this);id=$link.attr('id').substr(2);if(!opener){jQuery(document.getElementById('ex_'+id.replace(/:/g,'_').replace(/^_/,''))).dw_toggle();return;}dw_mediamanager.ext=false;dot=id.lastIndexOf(".");if(-1===dot){dw_mediamanager.insert(id);return;}ext=id.substr(dot);if({'.jpg':1,'.jpeg':1,'.png':1,'.gif':1,'.swf':1}[ext]!==1){dw_mediamanager.insert(id);return;}var $sendbtn=jQuery('#media__sendbtn');$sendbtn.off().on('click',bind(dw_mediamanager.insert,id));dw_mediamanager.unforbid('ext');if(ext==='.swf'){dw_mediamanager.ext='swf';dw_mediamanager.forbid('ext',{link:['1','2'],size:['4']});}else{dw_mediamanager.ext='img';}dw_mediamanager.setOpt('link');dw_mediamanager.setOpt('align');dw_mediamanager.setOpt('size');jQuery('#media__linkbtn1, #media__linkbtn2, #media__sizebtn4').toggle(dw_mediamanager.ext==='img');dw_mediamanager.$popup.dialog('open');$sendbtn.focus();},confirmattach:function(e){if(!confirm(LANG.del_confirm+"\n"+jQuery(this).attr('title'))){e.preventDefault();}},attachoptions:function(){var $obj,opts;$obj=jQuery('#media__opts');if($obj.length===0){return;}opts=[];if(opener){opts.push(['keepopen','keepopen']);}opts.push(['hide','hidedetails']);jQuery.each(opts,function(_,opt){var $box,$lbl;$box=jQuery(document.createElement('input')).attr('type','checkbox').attr('id','media__'+opt[0]).on('click',bind(dw_mediamanager.toggleOption,opt[0]));if(DokuCookie.getValue(opt[0])){$box.prop('checked',true);dw_mediamanager[opt[0]]=true;}$lbl=jQuery(document.createElement('label')).attr('for','media__'+opt[0]).text(LANG[opt[1]]);$obj.append($box,$lbl,document.createElement('br'));});dw_mediamanager.updatehide();},toggleOption:function(variable){if(jQuery(this).prop('checked')){DokuCookie.setValue(variable,1);dw_mediamanager[variable]=true;}else{DokuCookie.setValue(variable,'');dw_mediamanager[variable]=false;}if(variable==='hide'){dw_mediamanager.updatehide();}},updatehide:function(){jQuery('#media__content').find('div.detail').dw_toggle(!dw_mediamanager.hide);},setOpt:function(opt,e){var val,i;if(typeof e!=='undefined'){val=this.id.substring(this.id.length-1);}else{val=dw_mediamanager.getOpt(opt);}if(val===false){DokuCookie.setValue(opt,'');dw_mediamanager[opt]=false;return;}if(opt==='link'){if(val!=='4'&&dw_mediamanager.link==='4'){dw_mediamanager.unforbid('linkonly');dw_mediamanager.setOpt('align');dw_mediamanager.setOpt('size');}else if(val==='4'){dw_mediamanager.forbid('linkonly',{align:false,size:false});}jQuery("#media__size, #media__align").dw_toggle(val!=='4');}DokuCookie.setValue(opt,val);dw_mediamanager[opt]=val;for(i=1;i<=4;i++){jQuery("#media__"+opt+"btn"+i).removeClass('selected');}jQuery('#media__'+opt+'btn'+val).addClass('selected');},unforbid:function(group){delete dw_mediamanager.forbidden_opts[group];},forbid:function(group,forbids){dw_mediamanager.forbidden_opts[group]=forbids;},allowedOpt:function(opt,val){var ret=true;jQuery.each(dw_mediamanager.forbidden_opts,function(_,forbids){ret=forbids[opt]!==false&&jQuery.inArray(val,forbids[opt])===-1;return ret;});return ret;},getOpt:function(opt){var allowed=bind(dw_mediamanager.allowedOpt,opt);if(dw_mediamanager[opt]!==false&&allowed(dw_mediamanager[opt])){return dw_mediamanager[opt];}if(DokuCookie.getValue(opt)&&allowed(DokuCookie.getValue(opt))){return DokuCookie.getValue(opt);}if(opt==='size'&&allowed('2')){return'2';}return jQuery.grep(['1','2','3','4'],allowed)[0]||false;}};function dw_mediamanager_item_select(edid,mediaid,opts,align,keepopen){var alignleft='';var alignright='';var cursorInImageTag=false;var textArea=jQuery('#'+edid)[0];var selection=DWgetSelection(textArea);selection.end=selection.end+2;var charsAfterCursor=selection.getText();if(charsAfterCursor==='}}'){cursorInImageTag=true;}if(align!=='1'){alignleft=align==='2'?'':' ';alignright=align==='4'?'':' ';}if(keepopen&&cursorInImageTag){selection.start=selection.start+2;DWsetSelection(selection);}insertTags(edid,'{{'+alignleft+mediaid+opts+alignright+'|','}}','');}jQuery(dw_mediamanager.init);function DEPRECATED(msg){if(!window.console)return;if(!msg)msg='';var func;if(arguments.callee)func=arguments.callee.caller.name;if(func)func=' '+func+'()';var line='DEPRECATED function call'+func+'. '+msg;if(console.warn){console.warn(line);}else{console.log(line);}if(console.trace)console.trace();}function DEPRECATED_WRAP(func,context){return function(){DEPRECATED();return func.apply(context||this,arguments);};}jQuery.fn.dw_hide=function(fn,noaria){if(!noaria)this.attr('aria-expanded','false');return this.slideUp('fast',fn);};jQuery.fn.dw_show=function(fn,noaria){if(!noaria)this.attr('aria-expanded','true');return this.slideDown('fast',fn);};jQuery.fn.dw_toggle=function(state,fn,noaria){return this.each(function(){var $this=jQuery(this);if(typeof state==='undefined'){state=$this.is(':hidden');}$this[state?"dw_show":"dw_hide"](fn,noaria);});};var dw_behaviour={init:function(){dw_behaviour.focusMarker();dw_behaviour.scrollToMarker();dw_behaviour.removeHighlightOnClick();dw_behaviour.quickSelect();dw_behaviour.checkWindowsShares();dw_behaviour.subscription();dw_behaviour.pageRestoreConfirm();dw_behaviour.securityCheck();dw_behaviour.revisionBoxHandler();jQuery(document).on('click','#page__revisions input[type=checkbox]',dw_behaviour.revisionBoxHandler);jQuery('.bounce').effect('bounce',{times:10},2000);},scrollToMarker:function(){var $obj=jQuery('#scroll__here');if($obj.length){if($obj.offset().top!=0){jQuery('html, body').animate({scrollTop:$obj.offset().top-100},500);}else{$obj[0].scrollIntoView();}}},pageRestoreConfirm:function(){jQuery('#dokuwiki__pagetools li.revert a').on('click',function(){return confirm(LANG.restore_confirm);});},focusMarker:function(){jQuery('#focus__this').trigger('focus');},removeHighlightOnClick:function(){jQuery('span.search_hit').on('click',function(e){jQuery(e.target).removeClass('search_hit',1000);});},quickSelect:function(){jQuery('.quickselect').change(function(e){HTMLFormElement.prototype.submit.call(e.target.form);}).closest('form').find(':button').not('.show').hide();},checkWindowsShares:function(){if(!LANG.nosmblinks||navigator.userAgent.match(/(Trident|MSIE|Edge)/)){return;}jQuery('a.windows').on('click',function(){alert(LANG.nosmblinks.replace(/\\n/,"\n"));});},subscription:function(){var $form,$list,$digest;$form=jQuery('#subscribe__form');if(0===$form.length)return;$list=$form.find("input[name='sub_style'][value='list']");$digest=$form.find("input[name='sub_style'][value='digest']");$form.find("input[name='sub_target']").on('click',function(){var $this=jQuery(this),show_list;if(!$this.prop('checked')){return;}show_list=$this.val().match(/:$/);$list.parent().dw_toggle(show_list);if(!show_list&&$list.prop('checked')){$digest.prop('checked','checked');}}).filter(':checked').trigger('click');},revisionBoxHandler:function(){var $revisions=jQuery('#page__revisions');var $all=jQuery('input[type="checkbox"][name="rev2[]"]',$revisions);var $checked=$all.filter(':checked');var $button=jQuery('button',$revisions);if($checked.length<2){$all.prop('disabled',false);$button.prop('disabled',true);}else{$all.prop('disabled',true);$button.prop('disabled',false);$checked.each(function(i){jQuery(this).prop('disabled',false);if(i>1){jQuery(this).prop('checked',false);}});}},securityCheck:function(){var $checkDiv=jQuery('#security__check');if(!$checkDiv.length)return;if(sessionStorage.getItem('dw-security-check:'+DOKU_BASE)){$checkDiv.remove();return;}var img=new Image();img.onerror=function(){$checkDiv.remove();sessionStorage.setItem('dw-security-check:'+DOKU_BASE,true);};img.onload=function(){$checkDiv.html(LANG.data_insecure);$checkDiv.addClass('error');};img.src=$checkDiv.data('src')+'?t='+Date.now();}};jQuery(dw_behaviour.init);dw_page={init:function(){dw_page.sectionHighlight();dw_page.currentIDHighlight();jQuery('a.fn_top').on('mouseover',dw_page.footnoteDisplay);dw_page.makeToggle('#dw__toc h3','#dw__toc > div');},sectionHighlight:function(){jQuery('form.btn_secedit').each(function(){let $tgt=jQuery(this).parent();const match=$tgt.attr('class').match(/(\s+|^)editbutton_(\d+)(\s+|$)/);if(!match)return;const nr=match[2];let $highlight=jQuery();const $highlightWrap=jQuery('<div class="section_highlight_wrapper"></div>');$highlight=$highlight.add($tgt);while($tgt.length>0&&!($tgt.hasClass('sectionedit'+nr)||$tgt.find('.sectionedit'+nr).length)){$tgt=$tgt.prev();$highlight=$highlight.add($tgt);}$highlight.wrapAll($highlightWrap);}).on('mouseover',function(){jQuery(this).parents('.section_highlight_wrapper').addClass('section_highlight');}).on('mouseout',function(){jQuery(this).parents('.section_highlight_wrapper').removeClass('section_highlight');});},currentIDHighlight:function(){jQuery('a.wikilink1, a.wikilink2').filter('[data-wiki-id="'+JSINFO.id+'"]').wrap('<span class="curid"></span>');},insituPopup:function(target,popup_id){var $fndiv=jQuery('#'+popup_id);if($fndiv.length===0){$fndiv=jQuery(document.createElement('div')).attr('id',popup_id).addClass('insitu-footnote JSpopup').attr('aria-hidden','true').on('mouseleave',function(){jQuery(this).hide().attr('aria-hidden','true');}).attr('role','tooltip');jQuery('.dokuwiki:first').append($fndiv);}$fndiv.show().position({my:'left top',at:'left center',of:target}).hide();return $fndiv;},footnoteDisplay:function(){var $content=jQuery(jQuery(this).attr('href')).parent().siblings('.content').clone();if(!$content.length){return;}jQuery('[id]',$content).each(function(){var id=jQuery(this).attr('id');jQuery(this).attr('id','insitu__'+id);});var content=$content.html().trim();dw_page.insituPopup(this,'insitu__fn').html(content).show().attr('aria-hidden','false');},makeToggle:function(handle,content,state){var $handle,$content,$clicky,$child,setClicky;$handle=jQuery(handle);if(!$handle.length)return;$content=jQuery(content);if(!$content.length)return;$child=$content.children();setClicky=function(hiding){if(hiding){$clicky.html('<span>+</span>');$handle.addClass('closed');$handle.removeClass('open');}else{$clicky.html('<span>−</span>');$handle.addClass('open');$handle.removeClass('closed');}};$handle[0].setState=function(state){var hidden;if(!state)state=1;$content.css('min-height',$content.height()).show();$child.stop(true,true);if(state===-1){hidden=false;}else if(state===1){hidden=true;}else{hidden=$child.is(':hidden');}setClicky(!hidden);$child.dw_toggle(hidden,function(){$content.toggle(hidden);$content.attr('aria-expanded',hidden);$content.css('min-height','');},true);};$clicky=jQuery(document.createElement('strong'));$handle.css('cursor','pointer').on('click',$handle[0].setState).prepend($clicky);$handle[0].setState(state);}};jQuery(dw_page.init);var spc={config:{debug:false,dev:true},isDef:function(val){return(val===undefined)?false:true;},get_options:function(key,options){var result=null;if('object'==typeof(options)){result=options[key];}if(!result){return"";}return result;},set_wa:function(contlist,ariaattr,ariaval){$(contlist).attr(ariaattr,ariaval);},encode_entities:function(s){return $("<acronym/>").text(s).html();},decode_entities:function(s){return $("<acronym/>").html(s).text();},add_loadEvent:function(func_name){var lastonload=window.onload;if(typeof window.onload!='function'){window.onload=func_name;}else{window.onload=function(){lastonload();func_name();};}},_debug:function(msg){if(this.config.debug){try{if(console){console.log(msg);}else{alert(msg);}}catch(err){alert(msg);}}},_get_objVs:function(objl){try{var p=typeof JSON!="undefined"?JSON.stringify:function(objl){var arr=[];$.each(objl,function(key,val){var next=key+": ";next+=$.isPlainObject(val)?printObj(val):val;arr.push(next);});return"{ "+arr.join(", ")+" }";};return p(objl);}catch(err){this._debug(err);return'';}},aria_live:function(setobj){if(typeof(setobj)=='object'){setobj.attr('aria-live',"polite");}},aria_role:function(setobj,role){if(typeof(setobj)=='object'){setobj.attr('role',role);}},change_tabindex:function(remobj,setobj,i){if(typeof(remobj)=='object'){remobj.removeAttr('tabindex');}if(typeof(setobj)=='object'){setobj.attr('tabindex',i);}},set_newfocusObj:function(focusobj){try{if(focusobj)focusobj.focus();}catch(err){this._debug('exception: '+err);}},set_newfocusId:function(fid){try{var focusobj=document.getElementById(fid);if(focusobj)focusobj.focus();}catch(err){this._debug('exception: '+err);}},set_newfocusBox:function(remobj,setobj){this.change_tabindex(remobj,setobj,0);try{if(setobj)setobj.focus();}catch(err){this._debug('exception: '+err);}},set_title:function(remobj,setobj,ctitle){if(typeof(remobj)=='object'){remobj.removeAttr('title');}if(typeof(setobj)=='object'){setobj.attr('title',ctitle);}},count:function(jqdom){var num=0;$(jqdom).each(function(){num++;});return num;},countOV:function(objlit){var i=0;for(var elem in objlit){i++;}return i;},merge:function(objl1,objl2,objl3,objl4){return $.extend({},objl1,objl2,objl3,objl4);},mergeR:function(objl1,objl2,objl3,objl4){return $.extend(true,{},objl1,objl2,objl3,objl4);},loadImage:function(isrc,func,errfunc){try{var img=new Image();img.onload=func;img.onerror=errfunc;img.src=isrc;}catch(err){errfunc();}},tb_getPageSize:function(){var de=document.documentElement;var w=window.innerWidth||self.innerWidth||(de&&de.clientWidth)||document.body.clientWidth;var h=window.innerHeight||self.innerHeight||(de&&de.clientHeight)||document.body.clientHeight;arrayPageSize=[w,h];return arrayPageSize;},useLocStorage:function(){return('localStorage'in window&&window.localStorage!==null);},saveLSI:function(key,data){if(this.useLocStorage){localStorage.setItem(key,data);}},removeLSI:function(key){if(this.useLocStorage){localStorage.removeItem(key);}},getLSI:function(key){if(this.useLocStorage){return localStorage.getItem(key);}return'';},showAllLSI:function(){if(this.useLocStorage){var key="";for(var i=0;i<=localStorage.length-1;i++){key=localStorage.key(i);}}}};Array.prototype.shuffle=function(){var tmp,rand;for(var i=0;i<this.length;i++){rand=Math.floor(Math.random()*this.length);tmp=this[i];this[i]=this[rand];this[rand]=tmp;}};if(typeof String.prototype.trim!=='function'){String.prototype.trim=function(){return this.replace(/^\s\s*/,'').replace(/\s\s*$/,'');};}var $$=function(param){var node=$(param)[0];var id=$.data(node);$.cache[id]=$.cache[id]||{};$.cache[id].node=node;return $.cache[id];};var alertFB=false;if(typeof console==="undefined"||typeof console.log==="undefined"){console={};if(alertFB){console.log=function(msg){alert(msg);};}else{console.log=function(){};}}(function($){$.each(['show','hide'],function(i,e){var el=$.fn[e];$.fn[e]=function(){this.trigger(e);return el.apply(this,arguments);};});})(jQuery);
|
||
/*! VelocityJS.org (1.5.0). (C) 2014 Julian Shapiro. MIT @license: en.wikipedia.org/wiki/MIT_License */
|
||
/*! VelocityJS.org jQuery Shim (1.0.1). (C) 2014 The jQuery Foundation. MIT @license: en.wikipedia.org/wiki/MIT_License. */
|
||
!function(a){"use strict";function b(a){var b=a.length,d=c.type(a);return"function"!==d&&!c.isWindow(a)&&(!(1!==a.nodeType||!b)||("array"===d||0===b||"number"==typeof b&&b>0&&b-1 in a))}if(!a.jQuery){var c=function(a,b){return new c.fn.init(a,b)};c.isWindow=function(a){return a&&a===a.window},c.type=function(a){return a?"object"==typeof a||"function"==typeof a?e[g.call(a)]||"object":typeof a:a+""},c.isArray=Array.isArray||function(a){return"array"===c.type(a)},c.isPlainObject=function(a){var b;if(!a||"object"!==c.type(a)||a.nodeType||c.isWindow(a))return!1;try{if(a.constructor&&!f.call(a,"constructor")&&!f.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(d){return!1}for(b in a);return b===undefined||f.call(a,b)},c.each=function(a,c,d){var e=0,f=a.length,g=b(a);if(d){if(g)for(;e<f&&c.apply(a[e],d)!==!1;e++);else for(e in a)if(a.hasOwnProperty(e)&&c.apply(a[e],d)===!1)break}else if(g)for(;e<f&&c.call(a[e],e,a[e])!==!1;e++);else for(e in a)if(a.hasOwnProperty(e)&&c.call(a[e],e,a[e])===!1)break;return a},c.data=function(a,b,e){if(e===undefined){var f=a[c.expando],g=f&&d[f];if(b===undefined)return g;if(g&&b in g)return g[b]}else if(b!==undefined){var h=a[c.expando]||(a[c.expando]=++c.uuid);return d[h]=d[h]||{},d[h][b]=e,e}},c.removeData=function(a,b){var e=a[c.expando],f=e&&d[e];f&&(b?c.each(b,function(a,b){delete f[b]}):delete d[e])},c.extend=function(){var a,b,d,e,f,g,h=arguments[0]||{},i=1,j=arguments.length,k=!1;for("boolean"==typeof h&&(k=h,h=arguments[i]||{},i++),"object"!=typeof h&&"function"!==c.type(h)&&(h={}),i===j&&(h=this,i--);i<j;i++)if(f=arguments[i])for(e in f)f.hasOwnProperty(e)&&(a=h[e],d=f[e],h!==d&&(k&&d&&(c.isPlainObject(d)||(b=c.isArray(d)))?(b?(b=!1,g=a&&c.isArray(a)?a:[]):g=a&&c.isPlainObject(a)?a:{},h[e]=c.extend(k,g,d)):d!==undefined&&(h[e]=d)));return h},c.queue=function(a,d,e){if(a){d=(d||"fx")+"queue";var f=c.data(a,d);return e?(!f||c.isArray(e)?f=c.data(a,d,function(a,c){var d=c||[];return a&&(b(Object(a))?function(a,b){for(var c=+b.length,d=0,e=a.length;d<c;)a[e++]=b[d++];if(c!==c)for(;b[d]!==undefined;)a[e++]=b[d++];a.length=e,a}(d,"string"==typeof a?[a]:a):[].push.call(d,a)),d}(e)):f.push(e),f):f||[]}},c.dequeue=function(a,b){c.each(a.nodeType?[a]:a,function(a,d){b=b||"fx";var e=c.queue(d,b),f=e.shift();"inprogress"===f&&(f=e.shift()),f&&("fx"===b&&e.unshift("inprogress"),f.call(d,function(){c.dequeue(d,b)}))})},c.fn=c.prototype={init:function(a){if(a.nodeType)return this[0]=a,this;throw new Error("Not a DOM node.")},offset:function(){var b=this[0].getBoundingClientRect?this[0].getBoundingClientRect():{top:0,left:0};return{top:b.top+(a.pageYOffset||document.scrollTop||0)-(document.clientTop||0),left:b.left+(a.pageXOffset||document.scrollLeft||0)-(document.clientLeft||0)}},position:function(){var a=this[0],b=function(a){for(var b=a.offsetParent;b&&"html"!==b.nodeName.toLowerCase()&&b.style&&"static"===b.style.position;)b=b.offsetParent;return b||document}(a),d=this.offset(),e=/^(?:body|html)$/i.test(b.nodeName)?{top:0,left:0}:c(b).offset();return d.top-=parseFloat(a.style.marginTop)||0,d.left-=parseFloat(a.style.marginLeft)||0,b.style&&(e.top+=parseFloat(b.style.borderTopWidth)||0,e.left+=parseFloat(b.style.borderLeftWidth)||0),{top:d.top-e.top,left:d.left-e.left}}};var d={};c.expando="velocity"+(new Date).getTime(),c.uuid=0;for(var e={},f=e.hasOwnProperty,g=e.toString,h="Boolean Number String Function Array Date RegExp Object Error".split(" "),i=0;i<h.length;i++)e["[object "+h[i]+"]"]=h[i].toLowerCase();c.fn.init.prototype=c.fn,a.Velocity={Utilities:c}}}(window),function(a){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=a():"function"==typeof define&&define.amd?define(a):a()}(function(){"use strict";return function(a,b,c,d){function e(a){for(var b=-1,c=a?a.length:0,d=[];++b<c;){var e=a[b];e&&d.push(e)}return d}function f(a){return u.isWrapped(a)?a=s.call(a):u.isNode(a)&&(a=[a]),a}function g(a){var b=o.data(a,"velocity");return null===b?d:b}function h(a,b){var c=g(a);c&&c.delayTimer&&!c.delayPaused&&(c.delayRemaining=c.delay-b+c.delayBegin,c.delayPaused=!0,clearTimeout(c.delayTimer.setTimeout))}function i(a,b){var c=g(a);c&&c.delayTimer&&c.delayPaused&&(c.delayPaused=!1,c.delayTimer.setTimeout=setTimeout(c.delayTimer.next,c.delayRemaining))}function j(a){return function(b){return Math.round(b*a)*(1/a)}}function k(a,c,d,e){function f(a,b){return 1-3*b+3*a}function g(a,b){return 3*b-6*a}function h(a){return 3*a}function i(a,b,c){return((f(b,c)*a+g(b,c))*a+h(b))*a}function j(a,b,c){return 3*f(b,c)*a*a+2*g(b,c)*a+h(b)}function k(b,c){for(var e=0;e<p;++e){var f=j(c,a,d);if(0===f)return c;c-=(i(c,a,d)-b)/f}return c}function l(){for(var b=0;b<t;++b)x[b]=i(b*u,a,d)}function m(b,c,e){var f,g,h=0;do{g=c+(e-c)/2,f=i(g,a,d)-b,f>0?e=g:c=g}while(Math.abs(f)>r&&++h<s);return g}function n(b){for(var c=0,e=1,f=t-1;e!==f&&x[e]<=b;++e)c+=u;--e;var g=(b-x[e])/(x[e+1]-x[e]),h=c+g*u,i=j(h,a,d);return i>=q?k(b,h):0===i?h:m(b,c,c+u)}function o(){y=!0,a===c&&d===e||l()}var p=4,q=.001,r=1e-7,s=10,t=11,u=1/(t-1),v="Float32Array"in b;if(4!==arguments.length)return!1;for(var w=0;w<4;++w)if("number"!=typeof arguments[w]||isNaN(arguments[w])||!isFinite(arguments[w]))return!1;a=Math.min(a,1),d=Math.min(d,1),a=Math.max(a,0),d=Math.max(d,0);var x=v?new Float32Array(t):new Array(t),y=!1,z=function(b){return y||o(),a===c&&d===e?b:0===b?0:1===b?1:i(n(b),c,e)};z.getControlPoints=function(){return[{x:a,y:c},{x:d,y:e}]};var A="generateBezier("+[a,c,d,e]+")";return z.toString=function(){return A},z}function l(a,b){var c=a;return u.isString(a)?y.Easings[a]||(c=!1):c=u.isArray(a)&&1===a.length?j.apply(null,a):u.isArray(a)&&2===a.length?z.apply(null,a.concat([b])):!(!u.isArray(a)||4!==a.length)&&k.apply(null,a),c===!1&&(c=y.Easings[y.defaults.easing]?y.defaults.easing:x),c}function m(a){if(a){var b=y.timestamp&&a!==!0?a:r.now(),c=y.State.calls.length;c>1e4&&(y.State.calls=e(y.State.calls),c=y.State.calls.length);for(var f=0;f<c;f++)if(y.State.calls[f]){var h=y.State.calls[f],i=h[0],j=h[2],k=h[3],l=!!k,q=null,s=h[5],t=h[6];if(k||(k=y.State.calls[f][3]=b-16),s){if(s.resume!==!0)continue;k=h[3]=Math.round(b-t-16),h[5]=null}t=h[6]=b-k;for(var v=Math.min(t/j.duration,1),w=0,x=i.length;w<x;w++){var z=i[w],B=z.element;if(g(B)){var D=!1;if(j.display!==d&&null!==j.display&&"none"!==j.display){if("flex"===j.display){var E=["-webkit-box","-moz-box","-ms-flexbox","-webkit-flex"];o.each(E,function(a,b){A.setPropertyValue(B,"display",b)})}A.setPropertyValue(B,"display",j.display)}j.visibility!==d&&"hidden"!==j.visibility&&A.setPropertyValue(B,"visibility",j.visibility);for(var F in z)if(z.hasOwnProperty(F)&&"element"!==F){var G,H=z[F],I=u.isString(H.easing)?y.Easings[H.easing]:H.easing;if(u.isString(H.pattern)){var J=1===v?function(a,b,c){var d=H.endValue[b];return c?Math.round(d):d}:function(a,b,c){var d=H.startValue[b],e=H.endValue[b]-d,f=d+e*I(v,j,e);return c?Math.round(f):f};G=H.pattern.replace(/{(\d+)(!)?}/g,J)}else if(1===v)G=H.endValue;else{var K=H.endValue-H.startValue;G=H.startValue+K*I(v,j,K)}if(!l&&G===H.currentValue)continue;if(H.currentValue=G,"tween"===F)q=G;else{var L;if(A.Hooks.registered[F]){L=A.Hooks.getRoot(F);var M=g(B).rootPropertyValueCache[L];M&&(H.rootPropertyValue=M)}var N=A.setPropertyValue(B,F,H.currentValue+(p<9&&0===parseFloat(G)?"":H.unitType),H.rootPropertyValue,H.scrollData);A.Hooks.registered[F]&&(A.Normalizations.registered[L]?g(B).rootPropertyValueCache[L]=A.Normalizations.registered[L]("extract",null,N[1]):g(B).rootPropertyValueCache[L]=N[1]),"transform"===N[0]&&(D=!0)}}j.mobileHA&&g(B).transformCache.translate3d===d&&(g(B).transformCache.translate3d="(0px, 0px, 0px)",D=!0),D&&A.flushTransformCache(B)}}j.display!==d&&"none"!==j.display&&(y.State.calls[f][2].display=!1),j.visibility!==d&&"hidden"!==j.visibility&&(y.State.calls[f][2].visibility=!1),j.progress&&j.progress.call(h[1],h[1],v,Math.max(0,k+j.duration-b),k,q),1===v&&n(f)}}y.State.isTicking&&C(m)}function n(a,b){if(!y.State.calls[a])return!1;for(var c=y.State.calls[a][0],e=y.State.calls[a][1],f=y.State.calls[a][2],h=y.State.calls[a][4],i=!1,j=0,k=c.length;j<k;j++){var l=c[j].element;b||f.loop||("none"===f.display&&A.setPropertyValue(l,"display",f.display),"hidden"===f.visibility&&A.setPropertyValue(l,"visibility",f.visibility));var m=g(l);if(f.loop!==!0&&(o.queue(l)[1]===d||!/\.velocityQueueEntryFlag/i.test(o.queue(l)[1]))&&m){m.isAnimating=!1,m.rootPropertyValueCache={};var n=!1;o.each(A.Lists.transforms3D,function(a,b){var c=/^scale/.test(b)?1:0,e=m.transformCache[b];m.transformCache[b]!==d&&new RegExp("^\\("+c+"[^.]").test(e)&&(n=!0,delete m.transformCache[b])}),f.mobileHA&&(n=!0,delete m.transformCache.translate3d),n&&A.flushTransformCache(l),A.Values.removeClass(l,"velocity-animating")}if(!b&&f.complete&&!f.loop&&j===k-1)try{f.complete.call(e,e)}catch(r){setTimeout(function(){throw r},1)}h&&f.loop!==!0&&h(e),m&&f.loop===!0&&!b&&(o.each(m.tweensContainer,function(a,b){if(/^rotate/.test(a)&&(parseFloat(b.startValue)-parseFloat(b.endValue))%360==0){var c=b.startValue;b.startValue=b.endValue,b.endValue=c}/^backgroundPosition/.test(a)&&100===parseFloat(b.endValue)&&"%"===b.unitType&&(b.endValue=0,b.startValue=100)}),y(l,"reverse",{loop:!0,delay:f.delay})),f.queue!==!1&&o.dequeue(l,f.queue)}y.State.calls[a]=!1;for(var p=0,q=y.State.calls.length;p<q;p++)if(y.State.calls[p]!==!1){i=!0;break}i===!1&&(y.State.isTicking=!1,delete y.State.calls,y.State.calls=[])}var o,p=function(){if(c.documentMode)return c.documentMode;for(var a=7;a>4;a--){var b=c.createElement("div");if(b.innerHTML="<!--[if IE "+a+"]><span></span><![endif]-->",b.getElementsByTagName("span").length)return b=null,a}return d}(),q=function(){var a=0;return b.webkitRequestAnimationFrame||b.mozRequestAnimationFrame||function(b){var c,d=(new Date).getTime();return c=Math.max(0,16-(d-a)),a=d+c,setTimeout(function(){b(d+c)},c)}}(),r=function(){var a=b.performance||{};if("function"!=typeof a.now){var c=a.timing&&a.timing.navigationStart?a.timing.navigationStart:(new Date).getTime();a.now=function(){return(new Date).getTime()-c}}return a}(),s=function(){var a=Array.prototype.slice;try{return a.call(c.documentElement),a}catch(b){return function(b,c){var d=this.length;if("number"!=typeof b&&(b=0),"number"!=typeof c&&(c=d),this.slice)return a.call(this,b,c);var e,f=[],g=b>=0?b:Math.max(0,d+b),h=c<0?d+c:Math.min(c,d),i=h-g;if(i>0)if(f=new Array(i),this.charAt)for(e=0;e<i;e++)f[e]=this.charAt(g+e);else for(e=0;e<i;e++)f[e]=this[g+e];return f}}}(),t=function(){return Array.prototype.includes?function(a,b){return a.includes(b)}:Array.prototype.indexOf?function(a,b){return a.indexOf(b)>=0}:function(a,b){for(var c=0;c<a.length;c++)if(a[c]===b)return!0;return!1}},u={isNumber:function(a){return"number"==typeof a},isString:function(a){return"string"==typeof a},isArray:Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)},isFunction:function(a){return"[object Function]"===Object.prototype.toString.call(a)},isNode:function(a){return a&&a.nodeType},isWrapped:function(a){return a&&a!==b&&u.isNumber(a.length)&&!u.isString(a)&&!u.isFunction(a)&&!u.isNode(a)&&(0===a.length||u.isNode(a[0]))},isSVG:function(a){return b.SVGElement&&a instanceof b.SVGElement},isEmptyObject:function(a){for(var b in a)if(a.hasOwnProperty(b))return!1;return!0}},v=!1;if(a.fn&&a.fn.jquery?(o=a,v=!0):o=b.Velocity.Utilities,p<=8&&!v)throw new Error("Velocity: IE8 and below require jQuery to be loaded before Velocity.");if(p<=7)return void(jQuery.fn.velocity=jQuery.fn.animate);var w=400,x="swing",y={State:{isMobile:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),isAndroid:/Android/i.test(navigator.userAgent),isGingerbread:/Android 2\.3\.[3-7]/i.test(navigator.userAgent),isChrome:b.chrome,isFirefox:/Firefox/i.test(navigator.userAgent),prefixElement:c.createElement("div"),prefixMatches:{},scrollAnchor:null,scrollPropertyLeft:null,scrollPropertyTop:null,isTicking:!1,calls:[],delayedElements:{count:0}},CSS:{},Utilities:o,Redirects:{},Easings:{},Promise:b.Promise,defaults:{queue:"",duration:w,easing:x,begin:d,complete:d,progress:d,display:d,visibility:d,loop:!1,delay:!1,mobileHA:!0,_cacheValues:!0,promiseRejectEmpty:!0},init:function(a){o.data(a,"velocity",{isSVG:u.isSVG(a),isAnimating:!1,computedStyle:null,tweensContainer:null,rootPropertyValueCache:{},transformCache:{}})},hook:null,mock:!1,version:{major:1,minor:5,patch:0},debug:!1,timestamp:!0,pauseAll:function(a){var b=(new Date).getTime();o.each(y.State.calls,function(b,c){if(c){if(a!==d&&(c[2].queue!==a||c[2].queue===!1))return!0;c[5]={resume:!1}}}),o.each(y.State.delayedElements,function(a,c){c&&h(c,b)})},resumeAll:function(a){var b=(new Date).getTime();o.each(y.State.calls,function(b,c){if(c){if(a!==d&&(c[2].queue!==a||c[2].queue===!1))return!0;c[5]&&(c[5].resume=!0)}}),o.each(y.State.delayedElements,function(a,c){c&&i(c,b)})}};b.pageYOffset!==d?(y.State.scrollAnchor=b,y.State.scrollPropertyLeft="pageXOffset",y.State.scrollPropertyTop="pageYOffset"):(y.State.scrollAnchor=c.documentElement||c.body.parentNode||c.body,y.State.scrollPropertyLeft="scrollLeft",y.State.scrollPropertyTop="scrollTop");var z=function(){function a(a){return-a.tension*a.x-a.friction*a.v}function b(b,c,d){var e={x:b.x+d.dx*c,v:b.v+d.dv*c,tension:b.tension,friction:b.friction};return{dx:e.v,dv:a(e)}}function c(c,d){var e={dx:c.v,dv:a(c)},f=b(c,.5*d,e),g=b(c,.5*d,f),h=b(c,d,g),i=1/6*(e.dx+2*(f.dx+g.dx)+h.dx),j=1/6*(e.dv+2*(f.dv+g.dv)+h.dv);return c.x=c.x+i*d,c.v=c.v+j*d,c}return function d(a,b,e){var f,g,h,i={x:-1,v:0,tension:null,friction:null},j=[0],k=0;for(a=parseFloat(a)||500,b=parseFloat(b)||20,e=e||null,i.tension=a,i.friction=b,f=null!==e,f?(k=d(a,b),g=k/e*.016):g=.016;;)if(h=c(h||i,g),j.push(1+h.x),k+=16,!(Math.abs(h.x)>1e-4&&Math.abs(h.v)>1e-4))break;return f?function(a){return j[a*(j.length-1)|0]}:k}}();y.Easings={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2},spring:function(a){return 1-Math.cos(4.5*a*Math.PI)*Math.exp(6*-a)}},o.each([["ease",[.25,.1,.25,1]],["ease-in",[.42,0,1,1]],["ease-out",[0,0,.58,1]],["ease-in-out",[.42,0,.58,1]],["easeInSine",[.47,0,.745,.715]],["easeOutSine",[.39,.575,.565,1]],["easeInOutSine",[.445,.05,.55,.95]],["easeInQuad",[.55,.085,.68,.53]],["easeOutQuad",[.25,.46,.45,.94]],["easeInOutQuad",[.455,.03,.515,.955]],["easeInCubic",[.55,.055,.675,.19]],["easeOutCubic",[.215,.61,.355,1]],["easeInOutCubic",[.645,.045,.355,1]],["easeInQuart",[.895,.03,.685,.22]],["easeOutQuart",[.165,.84,.44,1]],["easeInOutQuart",[.77,0,.175,1]],["easeInQuint",[.755,.05,.855,.06]],["easeOutQuint",[.23,1,.32,1]],["easeInOutQuint",[.86,0,.07,1]],["easeInExpo",[.95,.05,.795,.035]],["easeOutExpo",[.19,1,.22,1]],["easeInOutExpo",[1,0,0,1]],["easeInCirc",[.6,.04,.98,.335]],["easeOutCirc",[.075,.82,.165,1]],["easeInOutCirc",[.785,.135,.15,.86]]],function(a,b){y.Easings[b[0]]=k.apply(null,b[1])});var A=y.CSS={RegEx:{isHex:/^#([A-f\d]{3}){1,2}$/i,valueUnwrap:/^[A-z]+\((.*)\)$/i,wrappedValueAlreadyExtracted:/[0-9.]+ [0-9.]+ [0-9.]+( [0-9.]+)?/,valueSplit:/([A-z]+\(.+\))|(([A-z0-9#-.]+?)(?=\s|$))/gi},Lists:{colors:["fill","stroke","stopColor","color","backgroundColor","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","outlineColor"],transformsBase:["translateX","translateY","scale","scaleX","scaleY","skewX","skewY","rotateZ"],transforms3D:["transformPerspective","translateZ","scaleZ","rotateX","rotateY"],units:["%","em","ex","ch","rem","vw","vh","vmin","vmax","cm","mm","Q","in","pc","pt","px","deg","grad","rad","turn","s","ms"],colorNames:{aliceblue:"240,248,255",antiquewhite:"250,235,215",aquamarine:"127,255,212",aqua:"0,255,255",azure:"240,255,255",beige:"245,245,220",bisque:"255,228,196",black:"0,0,0",blanchedalmond:"255,235,205",blueviolet:"138,43,226",blue:"0,0,255",brown:"165,42,42",burlywood:"222,184,135",cadetblue:"95,158,160",chartreuse:"127,255,0",chocolate:"210,105,30",coral:"255,127,80",cornflowerblue:"100,149,237",cornsilk:"255,248,220",crimson:"220,20,60",cyan:"0,255,255",darkblue:"0,0,139",darkcyan:"0,139,139",darkgoldenrod:"184,134,11",darkgray:"169,169,169",darkgrey:"169,169,169",darkgreen:"0,100,0",darkkhaki:"189,183,107",darkmagenta:"139,0,139",darkolivegreen:"85,107,47",darkorange:"255,140,0",darkorchid:"153,50,204",darkred:"139,0,0",darksalmon:"233,150,122",darkseagreen:"143,188,143",darkslateblue:"72,61,139",darkslategray:"47,79,79",darkturquoise:"0,206,209",darkviolet:"148,0,211",deeppink:"255,20,147",deepskyblue:"0,191,255",dimgray:"105,105,105",dimgrey:"105,105,105",dodgerblue:"30,144,255",firebrick:"178,34,34",floralwhite:"255,250,240",forestgreen:"34,139,34",fuchsia:"255,0,255",gainsboro:"220,220,220",ghostwhite:"248,248,255",gold:"255,215,0",goldenrod:"218,165,32",gray:"128,128,128",grey:"128,128,128",greenyellow:"173,255,47",green:"0,128,0",honeydew:"240,255,240",hotpink:"255,105,180",indianred:"205,92,92",indigo:"75,0,130",ivory:"255,255,240",khaki:"240,230,140",lavenderblush:"255,240,245",lavender:"230,230,250",lawngreen:"124,252,0",lemonchiffon:"255,250,205",lightblue:"173,216,230",lightcoral:"240,128,128",lightcyan:"224,255,255",lightgoldenrodyellow:"250,250,210",lightgray:"211,211,211",lightgrey:"211,211,211",lightgreen:"144,238,144",lightpink:"255,182,193",lightsalmon:"255,160,122",lightseagreen:"32,178,170",lightskyblue:"135,206,250",lightslategray:"119,136,153",lightsteelblue:"176,196,222",lightyellow:"255,255,224",limegreen:"50,205,50",lime:"0,255,0",linen:"250,240,230",magenta:"255,0,255",maroon:"128,0,0",mediumaquamarine:"102,205,170",mediumblue:"0,0,205",mediumorchid:"186,85,211",mediumpurple:"147,112,219",mediumseagreen:"60,179,113",mediumslateblue:"123,104,238",mediumspringgreen:"0,250,154",mediumturquoise:"72,209,204",mediumvioletred:"199,21,133",midnightblue:"25,25,112",mintcream:"245,255,250",mistyrose:"255,228,225",moccasin:"255,228,181",navajowhite:"255,222,173",navy:"0,0,128",oldlace:"253,245,230",olivedrab:"107,142,35",olive:"128,128,0",orangered:"255,69,0",orange:"255,165,0",orchid:"218,112,214",palegoldenrod:"238,232,170",palegreen:"152,251,152",paleturquoise:"175,238,238",palevioletred:"219,112,147",papayawhip:"255,239,213",peachpuff:"255,218,185",peru:"205,133,63",pink:"255,192,203",plum:"221,160,221",powderblue:"176,224,230",purple:"128,0,128",red:"255,0,0",rosybrown:"188,143,143",royalblue:"65,105,225",saddlebrown:"139,69,19",salmon:"250,128,114",sandybrown:"244,164,96",seagreen:"46,139,87",seashell:"255,245,238",sienna:"160,82,45",silver:"192,192,192",skyblue:"135,206,235",slateblue:"106,90,205",slategray:"112,128,144",snow:"255,250,250",springgreen:"0,255,127",steelblue:"70,130,180",tan:"210,180,140",teal:"0,128,128",thistle:"216,191,216",tomato:"255,99,71",turquoise:"64,224,208",violet:"238,130,238",wheat:"245,222,179",whitesmoke:"245,245,245",white:"255,255,255",yellowgreen:"154,205,50",yellow:"255,255,0"}},Hooks:{templates:{textShadow:["Color X Y Blur","black 0px 0px 0px"],boxShadow:["Color X Y Blur Spread","black 0px 0px 0px 0px"],clip:["Top Right Bottom Left","0px 0px 0px 0px"],backgroundPosition:["X Y","0% 0%"],transformOrigin:["X Y Z","50% 50% 0px"],perspectiveOrigin:["X Y","50% 50%"]},registered:{},register:function(){for(var a=0;a<A.Lists.colors.length;a++){var b="color"===A.Lists.colors[a]?"0 0 0 1":"255 255 255 1";A.Hooks.templates[A.Lists.colors[a]]=["Red Green Blue Alpha",b]}var c,d,e;if(p)for(c in A.Hooks.templates)if(A.Hooks.templates.hasOwnProperty(c)){d=A.Hooks.templates[c],e=d[0].split(" ");var f=d[1].match(A.RegEx.valueSplit);"Color"===e[0]&&(e.push(e.shift()),f.push(f.shift()),A.Hooks.templates[c]=[e.join(" "),f.join(" ")])}for(c in A.Hooks.templates)if(A.Hooks.templates.hasOwnProperty(c)){d=A.Hooks.templates[c],e=d[0].split(" ");for(var g in e)if(e.hasOwnProperty(g)){var h=c+e[g],i=g;A.Hooks.registered[h]=[c,i]}}},getRoot:function(a){var b=A.Hooks.registered[a];return b?b[0]:a},getUnit:function(a,b){var c=(a.substr(b||0,5).match(/^[a-z%]+/)||[])[0]||"";return c&&t(A.Lists.units,c)?c:""},fixColors:function(a){return a.replace(/(rgba?\(\s*)?(\b[a-z]+\b)/g,function(a,b,c){return A.Lists.colorNames.hasOwnProperty(c)?(b?b:"rgba(")+A.Lists.colorNames[c]+(b?"":",1)"):b+c})},cleanRootPropertyValue:function(a,b){return A.RegEx.valueUnwrap.test(b)&&(b=b.match(A.RegEx.valueUnwrap)[1]),A.Values.isCSSNullValue(b)&&(b=A.Hooks.templates[a][1]),b},extractValue:function(a,b){var c=A.Hooks.registered[a];if(c){var d=c[0],e=c[1];return b=A.Hooks.cleanRootPropertyValue(d,b),b.toString().match(A.RegEx.valueSplit)[e]}return b},injectValue:function(a,b,c){var d=A.Hooks.registered[a];if(d){var e,f=d[0],g=d[1];return c=A.Hooks.cleanRootPropertyValue(f,c),e=c.toString().match(A.RegEx.valueSplit),e[g]=b,e.join(" ")}return c}},Normalizations:{registered:{clip:function(a,b,c){switch(a){case"name":return"clip";case"extract":var d;return A.RegEx.wrappedValueAlreadyExtracted.test(c)?d=c:(d=c.toString().match(A.RegEx.valueUnwrap),d=d?d[1].replace(/,(\s+)?/g," "):c),d;case"inject":return"rect("+c+")"}},blur:function(a,b,c){switch(a){case"name":return y.State.isFirefox?"filter":"-webkit-filter";case"extract":var d=parseFloat(c);if(!d&&0!==d){var e=c.toString().match(/blur\(([0-9]+[A-z]+)\)/i);d=e?e[1]:0}return d;case"inject":return parseFloat(c)?"blur("+c+")":"none"}},opacity:function(a,b,c){if(p<=8)switch(a){case"name":return"filter";case"extract":var d=c.toString().match(/alpha\(opacity=(.*)\)/i);return c=d?d[1]/100:1;case"inject":return b.style.zoom=1,parseFloat(c)>=1?"":"alpha(opacity="+parseInt(100*parseFloat(c),10)+")"}else switch(a){case"name":return"opacity";case"extract":return c;case"inject":return c}}},register:function(){function a(a,b,c){if("border-box"===A.getPropertyValue(b,"boxSizing").toString().toLowerCase()===(c||!1)){var d,e,f=0,g="width"===a?["Left","Right"]:["Top","Bottom"],h=["padding"+g[0],"padding"+g[1],"border"+g[0]+"Width","border"+g[1]+"Width"];for(d=0;d<h.length;d++)e=parseFloat(A.getPropertyValue(b,h[d])),isNaN(e)||(f+=e);return c?-f:f}return 0}function b(b,c){return function(d,e,f){switch(d){case"name":return b;case"extract":return parseFloat(f)+a(b,e,c);case"inject":return parseFloat(f)-a(b,e,c)+"px"}}}p&&!(p>9)||y.State.isGingerbread||(A.Lists.transformsBase=A.Lists.transformsBase.concat(A.Lists.transforms3D));for(var c=0;c<A.Lists.transformsBase.length;c++)!function(){var a=A.Lists.transformsBase[c];A.Normalizations.registered[a]=function(b,c,e){switch(b){case"name":return"transform";case"extract":return g(c)===d||g(c).transformCache[a]===d?/^scale/i.test(a)?1:0:g(c).transformCache[a].replace(/[()]/g,"");case"inject":var f=!1;switch(a.substr(0,a.length-1)){case"translate":f=!/(%|px|em|rem|vw|vh|\d)$/i.test(e);break;case"scal":case"scale":y.State.isAndroid&&g(c).transformCache[a]===d&&e<1&&(e=1),f=!/(\d)$/i.test(e);break;case"skew":f=!/(deg|\d)$/i.test(e);break;case"rotate":f=!/(deg|\d)$/i.test(e)}return f||(g(c).transformCache[a]="("+e+")"),g(c).transformCache[a]}}}();for(var e=0;e<A.Lists.colors.length;e++)!function(){var a=A.Lists.colors[e];A.Normalizations.registered[a]=function(b,c,e){switch(b){case"name":return a;case"extract":var f;if(A.RegEx.wrappedValueAlreadyExtracted.test(e))f=e;else{var g,h={black:"rgb(0, 0, 0)",blue:"rgb(0, 0, 255)",gray:"rgb(128, 128, 128)",green:"rgb(0, 128, 0)",red:"rgb(255, 0, 0)",white:"rgb(255, 255, 255)"};/^[A-z]+$/i.test(e)?g=h[e]!==d?h[e]:h.black:A.RegEx.isHex.test(e)?g="rgb("+A.Values.hexToRgb(e).join(" ")+")":/^rgba?\(/i.test(e)||(g=h.black),f=(g||e).toString().match(A.RegEx.valueUnwrap)[1].replace(/,(\s+)?/g," ")}return(!p||p>8)&&3===f.split(" ").length&&(f+=" 1"),f;case"inject":return/^rgb/.test(e)?e:(p<=8?4===e.split(" ").length&&(e=e.split(/\s+/).slice(0,3).join(" ")):3===e.split(" ").length&&(e+=" 1"),(p<=8?"rgb":"rgba")+"("+e.replace(/\s+/g,",").replace(/\.(\d)+(?=,)/g,"")+")")}}}();A.Normalizations.registered.innerWidth=b("width",!0),A.Normalizations.registered.innerHeight=b("height",!0),A.Normalizations.registered.outerWidth=b("width"),A.Normalizations.registered.outerHeight=b("height")}},Names:{camelCase:function(a){return a.replace(/-(\w)/g,function(a,b){return b.toUpperCase()})},SVGAttribute:function(a){var b="width|height|x|y|cx|cy|r|rx|ry|x1|x2|y1|y2";return(p||y.State.isAndroid&&!y.State.isChrome)&&(b+="|transform"),new RegExp("^("+b+")$","i").test(a)},prefixCheck:function(a){if(y.State.prefixMatches[a])return[y.State.prefixMatches[a],!0];for(var b=["","Webkit","Moz","ms","O"],c=0,d=b.length;c<d;c++){var e;if(e=0===c?a:b[c]+a.replace(/^\w/,function(a){return a.toUpperCase()}),u.isString(y.State.prefixElement.style[e]))return y.State.prefixMatches[a]=e,[e,!0]}return[a,!1]}},Values:{hexToRgb:function(a){var b,c=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i;return a=a.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(a,b,c,d){return b+b+c+c+d+d}),b=c.exec(a),b?[parseInt(b[1],16),parseInt(b[2],16),parseInt(b[3],16)]:[0,0,0]},isCSSNullValue:function(a){return!a||/^(none|auto|transparent|(rgba\(0, ?0, ?0, ?0\)))$/i.test(a)},getUnitType:function(a){return/^(rotate|skew)/i.test(a)?"deg":/(^(scale|scaleX|scaleY|scaleZ|alpha|flexGrow|flexHeight|zIndex|fontWeight)$)|((opacity|red|green|blue|alpha)$)/i.test(a)?"":"px"},getDisplayType:function(a){var b=a&&a.tagName.toString().toLowerCase();return/^(b|big|i|small|tt|abbr|acronym|cite|code|dfn|em|kbd|strong|samp|var|a|bdo|br|img|map|object|q|script|span|sub|sup|button|input|label|select|textarea)$/i.test(b)?"inline":/^(li)$/i.test(b)?"list-item":/^(tr)$/i.test(b)?"table-row":/^(table)$/i.test(b)?"table":/^(tbody)$/i.test(b)?"table-row-group":"block"},addClass:function(a,b){if(a)if(a.classList)a.classList.add(b);else if(u.isString(a.className))a.className+=(a.className.length?" ":"")+b;else{var c=a.getAttribute(p<=7?"className":"class")||"";a.setAttribute("class",c+(c?" ":"")+b)}},removeClass:function(a,b){if(a)if(a.classList)a.classList.remove(b);else if(u.isString(a.className))a.className=a.className.toString().replace(new RegExp("(^|\\s)"+b.split(" ").join("|")+"(\\s|$)","gi")," ");else{var c=a.getAttribute(p<=7?"className":"class")||"";a.setAttribute("class",c.replace(new RegExp("(^|s)"+b.split(" ").join("|")+"(s|$)","gi")," "))}}},getPropertyValue:function(a,c,e,f){function h(a,c){var e=0;if(p<=8)e=o.css(a,c);else{var i=!1;/^(width|height)$/.test(c)&&0===A.getPropertyValue(a,"display")&&(i=!0,A.setPropertyValue(a,"display",A.Values.getDisplayType(a)));var j=function(){i&&A.setPropertyValue(a,"display","none")};if(!f){if("height"===c&&"border-box"!==A.getPropertyValue(a,"boxSizing").toString().toLowerCase()){var k=a.offsetHeight-(parseFloat(A.getPropertyValue(a,"borderTopWidth"))||0)-(parseFloat(A.getPropertyValue(a,"borderBottomWidth"))||0)-(parseFloat(A.getPropertyValue(a,"paddingTop"))||0)-(parseFloat(A.getPropertyValue(a,"paddingBottom"))||0);return j(),k}if("width"===c&&"border-box"!==A.getPropertyValue(a,"boxSizing").toString().toLowerCase()){var l=a.offsetWidth-(parseFloat(A.getPropertyValue(a,"borderLeftWidth"))||0)-(parseFloat(A.getPropertyValue(a,"borderRightWidth"))||0)-(parseFloat(A.getPropertyValue(a,"paddingLeft"))||0)-(parseFloat(A.getPropertyValue(a,"paddingRight"))||0);return j(),l}}var m;m=g(a)===d?b.getComputedStyle(a,null):g(a).computedStyle?g(a).computedStyle:g(a).computedStyle=b.getComputedStyle(a,null),"borderColor"===c&&(c="borderTopColor"),e=9===p&&"filter"===c?m.getPropertyValue(c):m[c],""!==e&&null!==e||(e=a.style[c]),j()}if("auto"===e&&/^(top|right|bottom|left)$/i.test(c)){var n=h(a,"position");("fixed"===n||"absolute"===n&&/top|left/i.test(c))&&(e=o(a).position()[c]+"px")}return e}var i;if(A.Hooks.registered[c]){var j=c,k=A.Hooks.getRoot(j);e===d&&(e=A.getPropertyValue(a,A.Names.prefixCheck(k)[0])),A.Normalizations.registered[k]&&(e=A.Normalizations.registered[k]("extract",a,e)),i=A.Hooks.extractValue(j,e)}else if(A.Normalizations.registered[c]){var l,m;l=A.Normalizations.registered[c]("name",a),"transform"!==l&&(m=h(a,A.Names.prefixCheck(l)[0]),A.Values.isCSSNullValue(m)&&A.Hooks.templates[c]&&(m=A.Hooks.templates[c][1])),i=A.Normalizations.registered[c]("extract",a,m)}if(!/^[\d-]/.test(i)){var n=g(a);if(n&&n.isSVG&&A.Names.SVGAttribute(c))if(/^(height|width)$/i.test(c))try{i=a.getBBox()[c]}catch(q){i=0}else i=a.getAttribute(c);else i=h(a,A.Names.prefixCheck(c)[0])}return A.Values.isCSSNullValue(i)&&(i=0),y.debug>=2&&console.log("Get "+c+": "+i),i},setPropertyValue:function(a,c,d,e,f){var h=c;if("scroll"===c)f.container?f.container["scroll"+f.direction]=d:"Left"===f.direction?b.scrollTo(d,f.alternateValue):b.scrollTo(f.alternateValue,d);else if(A.Normalizations.registered[c]&&"transform"===A.Normalizations.registered[c]("name",a))A.Normalizations.registered[c]("inject",a,d),h="transform",d=g(a).transformCache[c];else{if(A.Hooks.registered[c]){var i=c,j=A.Hooks.getRoot(c);e=e||A.getPropertyValue(a,j),d=A.Hooks.injectValue(i,d,e),c=j}if(A.Normalizations.registered[c]&&(d=A.Normalizations.registered[c]("inject",a,d),c=A.Normalizations.registered[c]("name",a)),h=A.Names.prefixCheck(c)[0],p<=8)try{a.style[h]=d}catch(l){y.debug&&console.log("Browser does not support ["+d+"] for ["+h+"]")}else{var k=g(a);k&&k.isSVG&&A.Names.SVGAttribute(c)?a.setAttribute(c,d):a.style[h]=d}y.debug>=2&&console.log("Set "+c+" ("+h+"): "+d)}return[h,d]},flushTransformCache:function(a){var b="",c=g(a);if((p||y.State.isAndroid&&!y.State.isChrome)&&c&&c.isSVG){var d=function(b){return parseFloat(A.getPropertyValue(a,b))},e={translate:[d("translateX"),d("translateY")],skewX:[d("skewX")],skewY:[d("skewY")],scale:1!==d("scale")?[d("scale"),d("scale")]:[d("scaleX"),d("scaleY")],rotate:[d("rotateZ"),0,0]};o.each(g(a).transformCache,function(a){/^translate/i.test(a)?a="translate":/^scale/i.test(a)?a="scale":/^rotate/i.test(a)&&(a="rotate"),e[a]&&(b+=a+"("+e[a].join(" ")+") ",delete e[a])})}else{var f,h;o.each(g(a).transformCache,function(c){if(f=g(a).transformCache[c],"transformPerspective"===c)return h=f,!0;9===p&&"rotateZ"===c&&(c="rotate"),b+=c+f+" "}),h&&(b="perspective"+h+" "+b)}A.setPropertyValue(a,"transform",b)}};A.Hooks.register(),A.Normalizations.register(),y.hook=function(a,b,c){var e;return a=f(a),o.each(a,function(a,f){if(g(f)===d&&y.init(f),c===d)e===d&&(e=A.getPropertyValue(f,b));else{var h=A.setPropertyValue(f,b,c);"transform"===h[0]&&y.CSS.flushTransformCache(f),e=h}}),e};var B=function(){function a(){return k?z.promise||null:p}function e(a,e){function f(f){var k,n;if(i.begin&&0===D)try{i.begin.call(r,r)}catch(V){setTimeout(function(){throw V},1)}if("scroll"===G){var p,q,w,x=/^x$/i.test(i.axis)?"Left":"Top",B=parseFloat(i.offset)||0;i.container?u.isWrapped(i.container)||u.isNode(i.container)?(i.container=i.container[0]||i.container,p=i.container["scroll"+x],w=p+o(a).position()[x.toLowerCase()]+B):i.container=null:(p=y.State.scrollAnchor[y.State["scrollProperty"+x]],q=y.State.scrollAnchor[y.State["scrollProperty"+("Left"===x?"Top":"Left")]],w=o(a).offset()[x.toLowerCase()]+B),j={scroll:{rootPropertyValue:!1,startValue:p,currentValue:p,endValue:w,unitType:"",easing:i.easing,scrollData:{container:i.container,direction:x,alternateValue:q}},element:a},y.debug&&console.log("tweensContainer (scroll): ",j.scroll,a)}else if("reverse"===G){if(!(k=g(a)))return;if(!k.tweensContainer)return void o.dequeue(a,i.queue);"none"===k.opts.display&&(k.opts.display="auto"),"hidden"===k.opts.visibility&&(k.opts.visibility="visible"),k.opts.loop=!1,k.opts.begin=null,k.opts.complete=null,v.easing||delete i.easing,v.duration||delete i.duration,i=o.extend({},k.opts,i),n=o.extend(!0,{},k?k.tweensContainer:null);for(var E in n)if(n.hasOwnProperty(E)&&"element"!==E){var F=n[E].startValue;n[E].startValue=n[E].currentValue=n[E].endValue,n[E].endValue=F,u.isEmptyObject(v)||(n[E].easing=i.easing),y.debug&&console.log("reverse tweensContainer ("+E+"): "+JSON.stringify(n[E]),a)}j=n}else if("start"===G){k=g(a),k&&k.tweensContainer&&k.isAnimating===!0&&(n=k.tweensContainer);var H=function(e,f){var g,l=A.Hooks.getRoot(e),m=!1,p=f[0],q=f[1],r=f[2]
|
||
;if(!(k&&k.isSVG||"tween"===l||A.Names.prefixCheck(l)[1]!==!1||A.Normalizations.registered[l]!==d))return void(y.debug&&console.log("Skipping ["+l+"] due to a lack of browser support."));(i.display!==d&&null!==i.display&&"none"!==i.display||i.visibility!==d&&"hidden"!==i.visibility)&&/opacity|filter/.test(e)&&!r&&0!==p&&(r=0),i._cacheValues&&n&&n[e]?(r===d&&(r=n[e].endValue+n[e].unitType),m=k.rootPropertyValueCache[l]):A.Hooks.registered[e]?r===d?(m=A.getPropertyValue(a,l),r=A.getPropertyValue(a,e,m)):m=A.Hooks.templates[l][1]:r===d&&(r=A.getPropertyValue(a,e));var s,t,v,w=!1,x=function(a,b){var c,d;return d=(b||"0").toString().toLowerCase().replace(/[%A-z]+$/,function(a){return c=a,""}),c||(c=A.Values.getUnitType(a)),[d,c]};if(r!==p&&u.isString(r)&&u.isString(p)){g="";var z=0,B=0,C=[],D=[],E=0,F=0,G=0;for(r=A.Hooks.fixColors(r),p=A.Hooks.fixColors(p);z<r.length&&B<p.length;){var H=r[z],I=p[B];if(/[\d\.-]/.test(H)&&/[\d\.-]/.test(I)){for(var J=H,K=I,L=".",N=".";++z<r.length;){if((H=r[z])===L)L="..";else if(!/\d/.test(H))break;J+=H}for(;++B<p.length;){if((I=p[B])===N)N="..";else if(!/\d/.test(I))break;K+=I}var O=A.Hooks.getUnit(r,z),P=A.Hooks.getUnit(p,B);if(z+=O.length,B+=P.length,O===P)J===K?g+=J+O:(g+="{"+C.length+(F?"!":"")+"}"+O,C.push(parseFloat(J)),D.push(parseFloat(K)));else{var Q=parseFloat(J),R=parseFloat(K);g+=(E<5?"calc":"")+"("+(Q?"{"+C.length+(F?"!":"")+"}":"0")+O+" + "+(R?"{"+(C.length+(Q?1:0))+(F?"!":"")+"}":"0")+P+")",Q&&(C.push(Q),D.push(0)),R&&(C.push(0),D.push(R))}}else{if(H!==I){E=0;break}g+=H,z++,B++,0===E&&"c"===H||1===E&&"a"===H||2===E&&"l"===H||3===E&&"c"===H||E>=4&&"("===H?E++:(E&&E<5||E>=4&&")"===H&&--E<5)&&(E=0),0===F&&"r"===H||1===F&&"g"===H||2===F&&"b"===H||3===F&&"a"===H||F>=3&&"("===H?(3===F&&"a"===H&&(G=1),F++):G&&","===H?++G>3&&(F=G=0):(G&&F<(G?5:4)||F>=(G?4:3)&&")"===H&&--F<(G?5:4))&&(F=G=0)}}z===r.length&&B===p.length||(y.debug&&console.error('Trying to pattern match mis-matched strings ["'+p+'", "'+r+'"]'),g=d),g&&(C.length?(y.debug&&console.log('Pattern found "'+g+'" -> ',C,D,"["+r+","+p+"]"),r=C,p=D,t=v=""):g=d)}g||(s=x(e,r),r=s[0],v=s[1],s=x(e,p),p=s[0].replace(/^([+-\/*])=/,function(a,b){return w=b,""}),t=s[1],r=parseFloat(r)||0,p=parseFloat(p)||0,"%"===t&&(/^(fontSize|lineHeight)$/.test(e)?(p/=100,t="em"):/^scale/.test(e)?(p/=100,t=""):/(Red|Green|Blue)$/i.test(e)&&(p=p/100*255,t="")));if(/[\/*]/.test(w))t=v;else if(v!==t&&0!==r)if(0===p)t=v;else{h=h||function(){var d={myParent:a.parentNode||c.body,position:A.getPropertyValue(a,"position"),fontSize:A.getPropertyValue(a,"fontSize")},e=d.position===M.lastPosition&&d.myParent===M.lastParent,f=d.fontSize===M.lastFontSize;M.lastParent=d.myParent,M.lastPosition=d.position,M.lastFontSize=d.fontSize;var g={};if(f&&e)g.emToPx=M.lastEmToPx,g.percentToPxWidth=M.lastPercentToPxWidth,g.percentToPxHeight=M.lastPercentToPxHeight;else{var h=k&&k.isSVG?c.createElementNS("http://www.w3.org/2000/svg","rect"):c.createElement("div");y.init(h),d.myParent.appendChild(h),o.each(["overflow","overflowX","overflowY"],function(a,b){y.CSS.setPropertyValue(h,b,"hidden")}),y.CSS.setPropertyValue(h,"position",d.position),y.CSS.setPropertyValue(h,"fontSize",d.fontSize),y.CSS.setPropertyValue(h,"boxSizing","content-box"),o.each(["minWidth","maxWidth","width","minHeight","maxHeight","height"],function(a,b){y.CSS.setPropertyValue(h,b,"100%")}),y.CSS.setPropertyValue(h,"paddingLeft","100em"),g.percentToPxWidth=M.lastPercentToPxWidth=(parseFloat(A.getPropertyValue(h,"width",null,!0))||1)/100,g.percentToPxHeight=M.lastPercentToPxHeight=(parseFloat(A.getPropertyValue(h,"height",null,!0))||1)/100,g.emToPx=M.lastEmToPx=(parseFloat(A.getPropertyValue(h,"paddingLeft"))||1)/100,d.myParent.removeChild(h)}return null===M.remToPx&&(M.remToPx=parseFloat(A.getPropertyValue(c.body,"fontSize"))||16),null===M.vwToPx&&(M.vwToPx=parseFloat(b.innerWidth)/100,M.vhToPx=parseFloat(b.innerHeight)/100),g.remToPx=M.remToPx,g.vwToPx=M.vwToPx,g.vhToPx=M.vhToPx,y.debug>=1&&console.log("Unit ratios: "+JSON.stringify(g),a),g}();var S=/margin|padding|left|right|width|text|word|letter/i.test(e)||/X$/.test(e)||"x"===e?"x":"y";switch(v){case"%":r*="x"===S?h.percentToPxWidth:h.percentToPxHeight;break;case"px":break;default:r*=h[v+"ToPx"]}switch(t){case"%":r*=1/("x"===S?h.percentToPxWidth:h.percentToPxHeight);break;case"px":break;default:r*=1/h[t+"ToPx"]}}switch(w){case"+":p=r+p;break;case"-":p=r-p;break;case"*":p*=r;break;case"/":p=r/p}j[e]={rootPropertyValue:m,startValue:r,currentValue:r,endValue:p,unitType:t,easing:q},g&&(j[e].pattern=g),y.debug&&console.log("tweensContainer ("+e+"): "+JSON.stringify(j[e]),a)};for(var I in s)if(s.hasOwnProperty(I)){var J=A.Names.camelCase(I),K=function(b,c){var d,f,g;return u.isFunction(b)&&(b=b.call(a,e,C)),u.isArray(b)?(d=b[0],!u.isArray(b[1])&&/^[\d-]/.test(b[1])||u.isFunction(b[1])||A.RegEx.isHex.test(b[1])?g=b[1]:u.isString(b[1])&&!A.RegEx.isHex.test(b[1])&&y.Easings[b[1]]||u.isArray(b[1])?(f=c?b[1]:l(b[1],i.duration),g=b[2]):g=b[1]||b[2]):d=b,c||(f=f||i.easing),u.isFunction(d)&&(d=d.call(a,e,C)),u.isFunction(g)&&(g=g.call(a,e,C)),[d||0,f,g]}(s[I]);if(t(A.Lists.colors,J)){var L=K[0],O=K[1],P=K[2];if(A.RegEx.isHex.test(L)){for(var Q=["Red","Green","Blue"],R=A.Values.hexToRgb(L),S=P?A.Values.hexToRgb(P):d,T=0;T<Q.length;T++){var U=[R[T]];O&&U.push(O),S!==d&&U.push(S[T]),H(J+Q[T],U)}continue}}H(J,K)}j.element=a}j.element&&(A.Values.addClass(a,"velocity-animating"),N.push(j),k=g(a),k&&(""===i.queue&&(k.tweensContainer=j,k.opts=i),k.isAnimating=!0),D===C-1?(y.State.calls.push([N,r,i,null,z.resolver,null,0]),y.State.isTicking===!1&&(y.State.isTicking=!0,m())):D++)}var h,i=o.extend({},y.defaults,v),j={};switch(g(a)===d&&y.init(a),parseFloat(i.delay)&&i.queue!==!1&&o.queue(a,i.queue,function(b){y.velocityQueueEntryFlag=!0;var c=y.State.delayedElements.count++;y.State.delayedElements[c]=a;var d=function(a){return function(){y.State.delayedElements[a]=!1,b()}}(c);g(a).delayBegin=(new Date).getTime(),g(a).delay=parseFloat(i.delay),g(a).delayTimer={setTimeout:setTimeout(b,parseFloat(i.delay)),next:d}}),i.duration.toString().toLowerCase()){case"fast":i.duration=200;break;case"normal":i.duration=w;break;case"slow":i.duration=600;break;default:i.duration=parseFloat(i.duration)||1}if(y.mock!==!1&&(y.mock===!0?i.duration=i.delay=1:(i.duration*=parseFloat(y.mock)||1,i.delay*=parseFloat(y.mock)||1)),i.easing=l(i.easing,i.duration),i.begin&&!u.isFunction(i.begin)&&(i.begin=null),i.progress&&!u.isFunction(i.progress)&&(i.progress=null),i.complete&&!u.isFunction(i.complete)&&(i.complete=null),i.display!==d&&null!==i.display&&(i.display=i.display.toString().toLowerCase(),"auto"===i.display&&(i.display=y.CSS.Values.getDisplayType(a))),i.visibility!==d&&null!==i.visibility&&(i.visibility=i.visibility.toString().toLowerCase()),i.mobileHA=i.mobileHA&&y.State.isMobile&&!y.State.isGingerbread,i.queue===!1)if(i.delay){var k=y.State.delayedElements.count++;y.State.delayedElements[k]=a;var n=function(a){return function(){y.State.delayedElements[a]=!1,f()}}(k);g(a).delayBegin=(new Date).getTime(),g(a).delay=parseFloat(i.delay),g(a).delayTimer={setTimeout:setTimeout(f,parseFloat(i.delay)),next:n}}else f();else o.queue(a,i.queue,function(a,b){if(b===!0)return z.promise&&z.resolver(r),!0;y.velocityQueueEntryFlag=!0,f(a)});""!==i.queue&&"fx"!==i.queue||"inprogress"===o.queue(a)[0]||o.dequeue(a)}var j,k,p,q,r,s,v,x=arguments[0]&&(arguments[0].p||o.isPlainObject(arguments[0].properties)&&!arguments[0].properties.names||u.isString(arguments[0].properties));u.isWrapped(this)?(k=!1,q=0,r=this,p=this):(k=!0,q=1,r=x?arguments[0].elements||arguments[0].e:arguments[0]);var z={promise:null,resolver:null,rejecter:null};if(k&&y.Promise&&(z.promise=new y.Promise(function(a,b){z.resolver=a,z.rejecter=b})),x?(s=arguments[0].properties||arguments[0].p,v=arguments[0].options||arguments[0].o):(s=arguments[q],v=arguments[q+1]),!(r=f(r)))return void(z.promise&&(s&&v&&v.promiseRejectEmpty===!1?z.resolver():z.rejecter()));var C=r.length,D=0;if(!/^(stop|finish|finishAll|pause|resume)$/i.test(s)&&!o.isPlainObject(v)){var E=q+1;v={};for(var F=E;F<arguments.length;F++)u.isArray(arguments[F])||!/^(fast|normal|slow)$/i.test(arguments[F])&&!/^\d/.test(arguments[F])?u.isString(arguments[F])||u.isArray(arguments[F])?v.easing=arguments[F]:u.isFunction(arguments[F])&&(v.complete=arguments[F]):v.duration=arguments[F]}var G;switch(s){case"scroll":G="scroll";break;case"reverse":G="reverse";break;case"pause":var H=(new Date).getTime();return o.each(r,function(a,b){h(b,H)}),o.each(y.State.calls,function(a,b){var c=!1;b&&o.each(b[1],function(a,e){var f=v===d?"":v;return f!==!0&&b[2].queue!==f&&(v!==d||b[2].queue!==!1)||(o.each(r,function(a,d){if(d===e)return b[5]={resume:!1},c=!0,!1}),!c&&void 0)})}),a();case"resume":return o.each(r,function(a,b){i(b,H)}),o.each(y.State.calls,function(a,b){var c=!1;b&&o.each(b[1],function(a,e){var f=v===d?"":v;return f!==!0&&b[2].queue!==f&&(v!==d||b[2].queue!==!1)||(!b[5]||(o.each(r,function(a,d){if(d===e)return b[5].resume=!0,c=!0,!1}),!c&&void 0))})}),a();case"finish":case"finishAll":case"stop":o.each(r,function(a,b){g(b)&&g(b).delayTimer&&(clearTimeout(g(b).delayTimer.setTimeout),g(b).delayTimer.next&&g(b).delayTimer.next(),delete g(b).delayTimer),"finishAll"!==s||v!==!0&&!u.isString(v)||(o.each(o.queue(b,u.isString(v)?v:""),function(a,b){u.isFunction(b)&&b()}),o.queue(b,u.isString(v)?v:"",[]))});var I=[];return o.each(y.State.calls,function(a,b){b&&o.each(b[1],function(c,e){var f=v===d?"":v;if(f!==!0&&b[2].queue!==f&&(v!==d||b[2].queue!==!1))return!0;o.each(r,function(c,d){if(d===e)if((v===!0||u.isString(v))&&(o.each(o.queue(d,u.isString(v)?v:""),function(a,b){u.isFunction(b)&&b(null,!0)}),o.queue(d,u.isString(v)?v:"",[])),"stop"===s){var h=g(d);h&&h.tweensContainer&&f!==!1&&o.each(h.tweensContainer,function(a,b){b.endValue=b.currentValue}),I.push(a)}else"finish"!==s&&"finishAll"!==s||(b[2].duration=1)})})}),"stop"===s&&(o.each(I,function(a,b){n(b,!0)}),z.promise&&z.resolver(r)),a();default:if(!o.isPlainObject(s)||u.isEmptyObject(s)){if(u.isString(s)&&y.Redirects[s]){j=o.extend({},v);var J=j.duration,K=j.delay||0;return j.backwards===!0&&(r=o.extend(!0,[],r).reverse()),o.each(r,function(a,b){parseFloat(j.stagger)?j.delay=K+parseFloat(j.stagger)*a:u.isFunction(j.stagger)&&(j.delay=K+j.stagger.call(b,a,C)),j.drag&&(j.duration=parseFloat(J)||(/^(callout|transition)/.test(s)?1e3:w),j.duration=Math.max(j.duration*(j.backwards?1-a/C:(a+1)/C),.75*j.duration,200)),y.Redirects[s].call(b,b,j||{},a,C,r,z.promise?z:d)}),a()}var L="Velocity: First argument ("+s+") was not a property map, a known action, or a registered redirect. Aborting.";return z.promise?z.rejecter(new Error(L)):b.console&&console.log(L),a()}G="start"}var M={lastParent:null,lastPosition:null,lastFontSize:null,lastPercentToPxWidth:null,lastPercentToPxHeight:null,lastEmToPx:null,remToPx:null,vwToPx:null,vhToPx:null},N=[];o.each(r,function(a,b){u.isNode(b)&&e(b,a)}),j=o.extend({},y.defaults,v),j.loop=parseInt(j.loop,10);var O=2*j.loop-1;if(j.loop)for(var P=0;P<O;P++){var Q={delay:j.delay,progress:j.progress};P===O-1&&(Q.display=j.display,Q.visibility=j.visibility,Q.complete=j.complete),B(r,"reverse",Q)}return a()};y=o.extend(B,y),y.animate=B;var C=b.requestAnimationFrame||q;if(!y.State.isMobile&&c.hidden!==d){var D=function(){c.hidden?(C=function(a){return setTimeout(function(){a(!0)},16)},m()):C=b.requestAnimationFrame||q};D(),c.addEventListener("visibilitychange",D)}return a.Velocity=y,a!==b&&(a.fn.velocity=B,a.fn.velocity.defaults=y.defaults),o.each(["Down","Up"],function(a,b){y.Redirects["slide"+b]=function(a,c,e,f,g,h){var i=o.extend({},c),j=i.begin,k=i.complete,l={},m={height:"",marginTop:"",marginBottom:"",paddingTop:"",paddingBottom:""};i.display===d&&(i.display="Down"===b?"inline"===y.CSS.Values.getDisplayType(a)?"inline-block":"block":"none"),i.begin=function(){0===e&&j&&j.call(g,g);for(var c in m)if(m.hasOwnProperty(c)){l[c]=a.style[c];var d=A.getPropertyValue(a,c);m[c]="Down"===b?[d,0]:[0,d]}l.overflow=a.style.overflow,a.style.overflow="hidden"},i.complete=function(){for(var b in l)l.hasOwnProperty(b)&&(a.style[b]=l[b]);e===f-1&&(k&&k.call(g,g),h&&h.resolver(g))},y(a,m,i)}}),o.each(["In","Out"],function(a,b){y.Redirects["fade"+b]=function(a,c,e,f,g,h){var i=o.extend({},c),j=i.complete,k={opacity:"In"===b?1:0};0!==e&&(i.begin=null),i.complete=e!==f-1?null:function(){j&&j.call(g,g),h&&h.resolver(g)},i.display===d&&(i.display="In"===b?"auto":"none"),y(this,k,i)}}),y}(window.jQuery||window.Zepto||window,window,window?window.document:undefined)});
|
||
jQuery(function(){var $panel=jQuery('div.qc-output').hide();jQuery('.page-attributes .plugin_qc a').load(DOKU_BASE+'lib/exe/ajax.php',{call:'plugin_qc_short',id:JSINFO['id']},function(){jQuery(this).find('span span').addClass('num');}).click(function(e){e.preventDefault();if($panel.html()==''){$panel.load(DOKU_BASE+'lib/exe/ajax.php',{call:'plugin_qc_long',id:JSINFO['id']},function(){$panel.dw_show();});}else{$panel.dw_toggle();}});});(function($){var debugBookCreatorOnDetailTemplate=function(){var $detail=$('#dokuwiki__detail');if(!$detail.length)return;if(JSINFO.bookcreator===undefined){JSINFO.bookcreator={};JSINFO.bookcreator.areToolsVisible=false;}};$(function(){debugBookCreatorOnDetailTemplate();});})(jQuery);(function($){var debugFoldedOnDetailTemplate=function(){var $detail=$('#dokuwiki__detail');if(!$detail.length)return;if(JSINFO.plugin_folded===undefined){JSINFO.plugin_folded={};JSINFO.plugin_folded.reveal='';JSINFO.plugin_folded.hide='';}};$(function(){debugFoldedOnDetailTemplate();});})(jQuery);(function($){var registerClickForTabsInMetaBox=function($metaBox){$metaBox.on('click','.meta-tabs a',function(e){e.preventDefault();var $tab=$(this),isopen=$tab.attr('aria-expanded')==='true';disableExistingTabs($metaBox);if(isopen)return;$tab .attr('aria-expanded','true').closest('li').addClass('active');$metaBox.find($tab.attr('href')).addClass('active').attr('aria-hidden','false');}).find('.meta-content').on('click','a[href*="#"]',function(e){disableExistingTabs($metaBox);}).find('#tagging__edit').on('hide',function(e){disableExistingTabs($metaBox);});if($('body').hasClass('do-admin')){var $tocLink=$metaBox.find('a[href="#spr__tab-toc"]');if($tocLink.length===1){$tocLink.trigger('click');}}},disableExistingTabs=function($metaBox){$metaBox.find('.meta-tabs li').removeClass('active').find('a').attr('aria-expanded','false');$metaBox.find('.meta-content .tab-pane').removeClass('active').attr('aria-hidden','false');};var stickyBox=function($metaBox,topOffset,leftOffset){if(window.pageYOffset>=topOffset){$metaBox.addClass("sticky").attr("style","left: "+leftOffset+"px");}else{$metaBox.removeClass("sticky").removeAttr("style");}};$(function(){var $metaBox=$('#spr__meta-box');if(!$metaBox.length)return;registerClickForTabsInMetaBox($metaBox);var topOffset=$metaBox.offset().top;window.onscroll=function(){var leftOffset=$metaBox.offset().left;stickyBox($metaBox,topOffset,leftOffset)};});})(jQuery);jQuery(function(){var $nav=jQuery('#dokuwiki__aside');if(!$nav.length)return;var sidebarId='';var divId=jQuery('#sidebarId');if(typeof divId!=='undefined'){sidebarId=divId.attr('class').split(' ')[0];}var setWideContent=function(){$nav.find('div.nav-panel').hide();jQuery('body').addClass('wide-content');removeToggleStorage();window.sessionStorage.setItem('wide-content',true);},removeToggleStorage=function(){for(var index=0;index<=window.sessionStorage.length;index+=1){var item=window.sessionStorage.getItem('sidebar-section-'+sidebarId+'-'+index+'-open');if(!item){continue;}window.sessionStorage.setItem('sidebar-section-'+sidebarId+'-'+index+'-open','false');}},setDefaultContent=function(){jQuery('body').removeClass('wide-content');window.sessionStorage.setItem('wide-content',false);},focusFirstSubLink=function($elem){$elem.find('a').first().focus();},removeOpenStates=function(){$nav.find('.is-open').removeClass('is-open');},toggleNav=function($toggler){var $panel=$toggler.parent().next('div.nav-panel');var isOpen=$panel.is(':visible');setDefaultContent();$panel.dw_toggle(!isOpen,function(){if(!isOpen){focusFirstSubLink($panel);$toggler.addClass('is-open');}else{$toggler.removeClass('is-open');}});window.sessionStorage.setItem('sidebar-section-'+sidebarId+'-'+$toggler.data('index')+'-open',!isOpen);},initContentNav=function(){var $main=$nav.find('nav.nav-main');if(!$main.length)return;if(jQuery('body').hasClass('wide-content')){removeToggleStorage();}var ELEMENT=JSINFO.template.sprintdoc.sidebar_toggle_elements;var $elements=$main.find(ELEMENT);$elements.each(function(index){var $me=jQuery(this),data=$me.text().split('@',2),text=data[0].trim();var $icon=jQuery('<span class="ico">').text(text.substr(0,1).toUpperCase()+text.substr(1,1).toLowerCase()).wrapInner('<strong>');if(data[1]){var src=data[1].trim();$icon.load(DOKU_BASE+'lib/tpl/sprintdoc/svg.php?svg='+src+'&e=1');}var $toggler=jQuery('<a>').attr('href','#').attr('role','heading').attr('aria-level','2').text(text).wrapInner('<span class="lbl">').prepend($icon).data('index',index);$toggler=jQuery('<div class="nav">').prepend($toggler);var $wrap=jQuery('<div>').addClass('nav-panel');var $sibs=$me.nextAll();for(var i=0;i<$sibs.length;i++){var $sib=jQuery($sibs[i]);if($sib.is(ELEMENT))break;$sib.detach().appendTo($wrap);addContentMenuCurrentStates($sib,$toggler);}var $links=jQuery($wrap[0]).find('a');if($links.length===1&&$links.first().attr('href')!=='#'){$toggler.children().first().attr('href',jQuery($links[0]).attr('href'));}else{$wrap.insertAfter($me);if($toggler.parent('li').length){$toggler.parent('li').addClass('toggler');}if(window.sessionStorage.getItem('sidebar-section-'+sidebarId+'-'+index+'-open')==='true'){$wrap.css('display','block');setTogglerClass($toggler,'is-open');}}$me.replaceWith($toggler);});$main.css({opacity:0,visibility:"visible"}).animate({opacity:1},200);},initMenuHandling=function(){$nav.on('click','div.nav a',function(e){if(jQuery(this).attr('href').startsWith('#')){toggleNav(jQuery(this));e.preventDefault();}});},setTogglerClass=function($toggler,classVal){if($toggler.is('a')){$toggler.addClass(classVal);}else{$toggler.find('a').addClass(classVal);}},addContentMenuCurrentStates=function($menuObj,$toggler){if($menuObj[0]&&String($menuObj[0].innerHTML).indexOf('curid')>0){setTogglerClass($toggler,'is-active');}},initContentMinHeight=function(){var $sidebar=jQuery('.page-wrapper').find('> .tools').find('.col-xs-12');if($sidebar.length==1){var num=parseFloat($sidebar.height());if(!isNaN(num)){jQuery('#dokuwiki__content').css('minHeight',num+100);}}},initSidebarToggling=function(){var $toggler=jQuery('.togglelink.page_main-content').find('a');$toggler.click(function(e){e.preventDefault();if(jQuery('body').hasClass('wide-content')){setDefaultContent();}else{setWideContent();removeOpenStates();}});if(window.sessionStorage.getItem('wide-content')==='true'){setWideContent();}},initSearchToggling=function(){jQuery('.toggleSearch').find('a').click(function(e){setDefaultContent();e.preventDefault();jQuery('#qsearch__in').focus();});},initMobileToggling=function(){jQuery('.menu-togglelink').find('a').click(function(e){e.preventDefault();var $body=jQuery('body');$body.toggleClass('show-mobile-sidebar');});},setActive=function(selectorArray,$nav){for(var i=0;i<selectorArray.length;i++){var mode=selectorArray[i];if(jQuery('body').is('.do-'+mode)){setTogglerClass($nav.find('.nav'),'is-active');$nav.find('a[href*="do='+mode+'"]').wrapAll('<span class="curid"></span>');}}},initTemplateMenues=function(){var $body=jQuery('body'),$siteTools=$nav.find('> .nav-sitetools'),$userTools=$nav.find('> .nav-usermenu'),$templateMenus=$nav.find('> nav:not(.nav-main)'),stModes=['recent','media','index'],utModes=['profile','admin'],isWideContent=false;setActive(stModes,$siteTools);setActive(utModes,$userTools);if($body.is('.do-show')&&$body.is('.wide-content')){window.sessionStorage.setItem('wide-content',true);isWideContent=true;}$templateMenus.each(function(index){var $t=jQuery(this).find('.nav'),y=$nav.find('.nav-main').find('.nav').length,$toggler=($t.is('a'))?$t:$t.find('a:last'),tIndex=y+index;$toggler.data('index',tIndex);var item=window.sessionStorage.getItem('sidebar-section-'+sidebarId+'-'+tIndex+'-open');if(item){if(isWideContent){window.sessionStorage.setItem('sidebar-section-'+sidebarId+'-'+tIndex+'-open','false');}else{if(item==='true'){jQuery(this).find('.nav-panel').css('display','block');setTogglerClass($toggler,'is-open');}}}});};initContentNav();initSidebarToggling();initTemplateMenues();initMenuHandling();initContentMinHeight();initSearchToggling();initMobileToggling();});(function($){var $body,scrollingForDirectNav=function($directMenu){$body=$('body');checkAnchorsOnLoad($directMenu);registerClickForDirectLinks($directMenu);},registerClickForDirectLinks=function($menu){$menu.find('a').on('click',function(e){e.stopPropagation();var target=$(this).attr('href');tasksBeforeScrolling(target);scrollToTarget(target);});},checkAnchorsOnLoad=function($menu){var hash=window.location.hash;if(hash){$menu.find('a').each(function(){var target=$(this).attr('href');if(hash===target){tasksBeforeScrolling(target);scrollToTarget(target);setFocusOnLoad(target);}});}},tasksBeforeScrolling=function(target){switch(target){case'#qsearch__in':showSearchField(target);break;case'#dokuwiki__usertools':$(target).find('li:first-child').find('a').focus();break;}},setFocusOnLoad=function(target){var $target=$(target);switch(target){case'#qsearch__in':case'#spr__toggle-content':$target.focus();break;case'#dokuwiki__usertools':break;default:$target.attr('tabindex',0);$target.focus();}},showSearchField=function(target){if($body.hasClass('wide-content')){$('#spr__toggle-content').trigger('click');}},scrollToTarget=function(target){$(target).velocity('scroll',{duration:400,offset:-60,easing:'ease-in-out'});};$(function(){var $directMenu=$('#spr__direct');if(!$directMenu.length)return;scrollingForDirectNav($directMenu);});})(jQuery);jQuery(function(){jQuery('#dokuwiki__content.main-content').find('h1,h2,h3,h4,h5').append(function(){if(this.id){return'<a href="#'+this.id+'" class="anchor">'+'<svg viewBox="2 2 22 22">'+'<path d="M10.59,13.41C11,13.8 11,14.44 10.59,14.83C10.2,15.22 9.56,15.22 9.17,14.83C7.22,12.88 7.22,9.71 9.17,7.76V7.76L12.71,4.22C14.66,2.27 17.83,2.27 19.78,4.22C21.73,6.17 21.73,9.34 19.78,11.29L18.29,12.78C18.3,11.96 18.17,11.14 17.89,10.36L18.36,9.88C19.54,8.71 19.54,6.81 18.36,5.64C17.19,4.46 15.29,4.46 14.12,5.64L10.59,9.17C9.41,10.34 9.41,12.24 10.59,13.41M13.41,9.17C13.8,8.78 14.44,8.78 14.83,9.17C16.78,11.12 16.78,14.29 14.83,16.24V16.24L11.29,19.78C9.34,21.73 6.17,21.73 4.22,19.78C2.27,17.83 2.27,14.66 4.22,12.71L5.71,11.22C5.7,12.04 5.83,12.86 6.11,13.65L5.64,14.12C4.46,15.29 4.46,17.19 5.64,18.36C6.81,19.54 8.71,19.54 9.88,18.36L13.41,14.83C14.59,13.66 14.59,11.76 13.41,10.59C13,10.2 13,9.56 13.41,9.17Z" />'+'</svg>'+'</a>';}else{return'';}})});var dw_acl={init:function(){var $tree;if(jQuery('#acl_manager').length===0){return;}jQuery('#acl__user select').on('change',dw_acl.userselhandler);jQuery('#acl__user button').on('click',dw_acl.loadinfo);$tree=jQuery('#acl__tree');$tree.dw_tree({toggle_selector:'img',load_data:function(show_sublist,$clicky){var $frm=jQuery('#acl__detail form');jQuery.post(DOKU_BASE+'lib/exe/ajax.php',jQuery.extend(dw_acl.parseatt($clicky.parent().find('a')[0].search),{call:'plugin_acl',ajax:'tree',current_ns:$frm.find('input[name=ns]').val(),current_id:$frm.find('input[name=id]').val()}),show_sublist,'html');},toggle_display:function($clicky,opening){$clicky.attr('src',DOKU_BASE+'lib/images/'+(opening?'minus':'plus')+'.gif');}});$tree.delegate('a','click',dw_acl.treehandler);},userselhandler:function(){jQuery('#acl__user input').toggle(this.value==='__g__'||this.value==='__u__');dw_acl.loadinfo();},loadinfo:function(){jQuery('#acl__info').attr('role','alert').html('<img src="'+DOKU_BASE+'lib/images/throbber.gif" alt="..." />').load(DOKU_BASE+'lib/exe/ajax.php',jQuery('#acl__detail form').serialize()+'&call=plugin_acl&ajax=info');return false;},parseatt:function(str){if(str[0]==='?'){str=str.substr(1);}var attributes={};var all=str.split('&');for(var i=0;i<all.length;i++){var att=all[i].split('=');attributes[att[0]]=decodeURIComponent(att[1]);}return attributes;},treehandler:function(){var $link,$frm;$link=jQuery(this);jQuery('#acl__tree a.cur').removeClass('cur');$link.addClass('cur');$frm=jQuery('#acl__detail form');if($link.hasClass('wikilink1')){$frm.find('input[name=ns]').val('');$frm.find('input[name=id]').val(dw_acl.parseatt($link[0].search).id);}else if($link.hasClass('idx_dir')){$frm.find('input[name=ns]').val(dw_acl.parseatt($link[0].search).ns);$frm.find('input[name=id]').val('');}dw_acl.loadinfo();return false;}};jQuery(dw_acl.init);jQuery(function(){var $extmgr=jQuery('#extension__manager');$extmgr.find('button.uninstall').on('click',function(e){if(!window.confirm(LANG.plugins.extension.reallydel)){e.preventDefault();return false;}return true;});$extmgr.find('a.extension_screenshot').on('click',function(e){e.preventDefault();var image_href=jQuery(this).attr("href");var $lightbox=jQuery('#plugin__extensionlightbox');if(!$lightbox.length){$lightbox=jQuery('<div id="plugin__extensionlightbox"><p>Click to close</p><div></div></div>').appendTo(jQuery('body')).hide().on('click',function(){$lightbox.hide();});}$lightbox .show().find('div').html('<img src="'+image_href+'" />');return false;});$extmgr.find('button.disable, button.enable').on('click',function(e){e.preventDefault();var $btn=jQuery(this);var extension=$btn.attr('name').split('[')[2];extension=extension.substr(0,extension.length-1);var act=($btn.hasClass('disable'))?'disable':'enable';$btn.attr('disabled','disabled');$btn.css('cursor','wait');jQuery.get(DOKU_BASE+'lib/exe/ajax.php',{call:'plugin_extension',ext:extension,act:act,sectok:$btn.parents('form').find('input[name=sectok]').val()},function(data){$btn.css('cursor','').removeAttr('disabled').removeClass('disable').removeClass('enable').text(data.label).addClass(data.reverse).parents('li').removeClass('disabled').removeClass('enabled').addClass(data.state);}).fail(function(){$btn.css('cursor','').removeAttr('disabled');});});$extmgr.find('a.info').on('click',function(e){e.preventDefault();var $link=jQuery(this);var $details=$link.parent().find('dl.details');if($details.length){$link.toggleClass('close');$details.toggle();return;}$link.addClass('close');jQuery.get(DOKU_BASE+'lib/exe/ajax.php',{call:'plugin_extension',ext:$link.data('extid'),act:'info'},function(data){$link.parent().append(data);});});if($extmgr.find('.plugins, .templates').hasClass('active')){var $extlist=jQuery('#extension__list');$extlist.addClass('hasDisplayOptions');var $displayOpts=jQuery('<p>',{id:'extension__viewoptions'}).appendTo($extmgr.find('.panelHeader'));$displayOpts.append(LANG.plugins.extension.display_viewoptions);var displayOptionsHandler=function(){$extlist.toggleClass(this.name);DokuCookie.setValue('ext_'+this.name,$extlist.hasClass(this.name)?'1':'0');};jQuery(['enabled','disabled','updatable']).each(function(index,chkName){var $label=jQuery('<label></label>').appendTo($displayOpts);var $input=jQuery('<input />',{type:'checkbox',name:chkName}).on('change',displayOptionsHandler).appendTo($label);var previous=DokuCookie.getValue('ext_'+chkName);if(typeof previous==="undefined"||previous=='1'){$input.trigger('click');}jQuery('<span/>').append(' '+LANG.plugins.extension['display_'+chkName]).appendTo($label);});}});jQuery(function(){var $dl=jQuery('#plugin__logviewer').find('dl');if(!$dl.length)return;$dl.animate({scrollTop:$dl.prop("scrollHeight")},500);var $filter=jQuery('<input>');$filter.on('keyup',function(e){var re=new RegExp($filter.val(),'i');$dl.find('dt').each(function(idx,elem){if(elem.innerText.match(re)){jQuery(elem).removeClass('hidden');}else{jQuery(elem).addClass('hidden');}});});$dl.before($filter);$filter.wrap('<label></label>');$filter.before(LANG.plugins.logviewer.filter+' ');});jQuery(function(){function applyPreview(target){var $style=target.jQuery('link[rel=stylesheet][href*="lib/exe/css.php"]');$style.attr('href','');var $loader=target.jQuery('#plugin__styling_loader');if(!$loader.length){$loader=target.jQuery('<div id="plugin__styling_loader">'+LANG.plugins.styling.loader+'</div>');$loader.css({'position':'absolute','width':'100%','height':'100%','top':0,'left':0,'z-index':5000,'background-color':'#fff','opacity':'0.7','color':'#000','font-size':'2.5em','text-align':'center','line-height':1.5,'padding-top':'2em'});target.jQuery('body').append($loader);}setTimeout(function(){var now=new Date().getTime();$style.attr('href',DOKU_BASE+'lib/exe/css.php?preview=1&tseed='+now);},500);}var doreload=1;var $styling_plugin=jQuery('#plugin__styling');if(!$styling_plugin.length){if(DokuCookie.getValue('styling_plugin')==1){applyPreview(window);}return;}if(!$styling_plugin.hasClass('ispopup')){var $form=$styling_plugin.find('form.styling').first();var $btn=jQuery('<button>'+LANG.plugins.styling.popup+'</button>');$form.prepend($btn);$btn.on('click',function(e){var windowFeatures="menubar=no,location=no,resizable=yes,scrollbars=yes,status=false,width=500,height=500";window.open(DOKU_BASE+'lib/plugins/styling/popup.php','styling_popup',windowFeatures);e.preventDefault();e.stopPropagation();}).wrap('<p></p>');return;}window.onunload=function(e){if(doreload){DokuCookie.setValue('styling_plugin',0);if(window.opener)window.opener.document.location.reload();}return null;};jQuery(':button').click(function(e){doreload=false;});if(window.opener)applyPreview(window.opener);DokuCookie.setValue('styling_plugin',1);});jQuery(function(){jQuery('form.plugin__tag_search table input').change(function(){if(jQuery(this).attr('checked')){if(jQuery(this).parent().hasClass('minus')){jQuery(this).closest('tr').find('.plus input').attr('checked',false);}else{jQuery(this).closest('tr').find('.minus input').attr('checked',false);}}})});var ToDoPlugin={locked:false,todo:function($chk){if(ToDoPlugin.locked){return;}ToDoPlugin.locked=true;var $spanTodoinnertext=$chk.nextAll("span.todotext:first").find("span.todoinnertext"),param=$chk.data(),checked=!$chk.is(':checked');if(param.index===undefined)param.index=-1;if($spanTodoinnertext.length){var whenCompleted=function(data){if(data.date){jQuery('input.todocheckbox').data('date',data.date);}if(data.message){alert(data.message);}if(data.succeed){$chk.prop('checked',checked);if(checked){if(param.strikethrough&&!$spanTodoinnertext.parent().is("del")){$spanTodoinnertext.wrap("<del></del>");}}else{if($spanTodoinnertext.parent().is("del")){$spanTodoinnertext.unwrap();}}}ToDoPlugin.locked=false;};jQuery.post(DOKU_BASE+'lib/exe/ajax.php',{call:'plugin_todo',mode:'checkbox',index:param.index,pageid:param.pageid,checked:checked?"1":"0",date:param.date},whenCompleted,'json');}else{alert("Appropriate javascript element not found.\nReverting checkmark.");}},uncheckall:function(){if(ToDoPlugin.locked){return;}ToDoPlugin.locked=true;var whenCompleted=function(){jQuery('input.todocheckbox').each(function(){jQuery(this).prop('checked',false);});jQuery('span.todoinnertext').each(function(){if(jQuery(this).parent().is("del")){jQuery(this).unwrap();}});jQuery('span.todouser').each(function(){jQuery(this).remove();});ToDoPlugin.locked=false;};jQuery.post(DOKU_BASE+'lib/exe/ajax.php',{call:'plugin_todo',mode:'uncheckall',pageid:jQuery('input.todocheckbox:first').data().pageid},whenCompleted,'json');}};jQuery(function(){jQuery('input.todocheckbox').click(function(e){e.preventDefault();e.stopPropagation();var $this=jQuery(this);$this.prop('checked',!$this.is(':checked'));ToDoPlugin.todo($this);});jQuery('span.todotext.clickabletodo').click(function(){var $chk=jQuery(this).prevAll('input.todocheckbox:first');ToDoPlugin.todo($chk);});jQuery('button.todouncheckall').click(function(){ToDoPlugin.uncheckall();});});jQuery(function(){jQuery('#usrmgr__del').on('click',function(){return confirm(LANG.del_confirm);});});jQuery(function(){dw_locktimer.init(840,1);});
|