mirror of
https://github.com/koel/koel
synced 2024-11-24 21:23:06 +00:00
6 lines
164 KiB
JavaScript
6 lines
164 KiB
JavaScript
|
!function(){if("ontouchstart"in window){var e,t,n,r,i,o,s={};e=function(e,t){return Math.abs(e[0]-t[0])>5||Math.abs(e[1]-t[1])>5},t=function(e){this.startXY=[e.touches[0].clientX,e.touches[0].clientY],this.threshold=!1},n=function(t){return!this.threshold&&void(this.threshold=e(this.startXY,[t.touches[0].clientX,t.touches[0].clientY]))},r=function(t){if(!this.threshold&&!e(this.startXY,[t.changedTouches[0].clientX,t.changedTouches[0].clientY])){var n=t.changedTouches[0],r=document.createEvent("MouseEvents");r.initMouseEvent("click",!0,!0,window,0,n.screenX,n.screenY,n.clientX,n.clientY,!1,!1,!1,!1,0,null),r.simulated=!0,t.target.dispatchEvent(r)}},i=function(e){var t=Date.now(),n=t-s.time,r=e.clientX,i=e.clientY,a=[Math.abs(s.x-r),Math.abs(s.y-i)],c=o(e.target,"A")||e.target,l=c.nodeName,u="A"===l,d=window.navigator.standalone&&u&&e.target.getAttribute("href");return s.time=t,s.x=r,s.y=i,!((!e.simulated&&(n<500||n<1500&&a[0]<50&&a[1]<50)||d)&&(e.preventDefault(),e.stopPropagation(),!d))&&(d&&(window.location=c.getAttribute("href")),void(c&&c.classList&&(c.classList.add("energize-focus"),window.setTimeout(function(){c.classList.remove("energize-focus")},150))))},o=function(e,t){for(var n=e;n!==document.body;){if(!n||n.nodeName===t)return n;n=n.parentNode}return null},document.addEventListener("touchstart",t,!1),document.addEventListener("touchmove",n,!1),document.addEventListener("touchend",r,!1),document.addEventListener("click",i,!0)}}(),!function(e,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){function n(e){var t=e.length,n=G.type(e);return"function"!==n&&!G.isWindow(e)&&(!(1!==e.nodeType||!t)||("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e))}function r(e,t,n){if(G.isFunction(t))return G.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return G.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(ae.test(t))return G.filter(t,e,n);t=G.filter(t,e)}return G.grep(e,function(e){return Q.call(t,e)>=0!==n})}function i(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function o(e){var t=he[e]={};return G.each(e.match(pe)||[],function(e,n){t[n]=!0}),t}function s(){Y.removeEventListener("DOMContentLoaded",s,!1),e.removeEventListener("load",s,!1),G.ready()}function a(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=G.expando+a.uid++}function c(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(we,"-$1").toLowerCase(),n=e.getAttribute(r),"string"==typeof n){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:be.test(n)?G.parseJSON(n):n)}catch(i){}ye.set(e,t,n)}else n=void 0;return n}function l(){return!0}function u(){return!1}function d(){try{return Y.activeElement}catch(e){}}function f(e,t){return G.nodeName(e,"table")&&G.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function p(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function h(e){var t=Re.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function g(e,t){for(var n=0,r=e.length;r>n;n++)ve.set(e[n],"globalEval",!t||ve.get(t[n],"globalEval"))}function m(e,t){var n,r,i,o,s,a,c,l;if(1===t.nodeType){if(ve.hasData(e)&&(o=ve.access(e),s=ve.set(t,o),l=o.events)){delete s.handle,s.events={};for(i in l)for(n=0,r=l[i].length;r>n;n++)G.event.add(t,i,l[i][n])}ye.hasData(e)&&(a=ye.access(e),c=G.extend({},a),ye.set(t,c))}}function v(e,t){var n=e.getElementsByTagName?e.getElementsByTagName(t||"*"):e.querySelectorAll?e.querySelectorAll(t||"*"):[];return void 0===t||t&&G.nodeName(e,t)?G.merge([e],n):n}function y(e,t){var n=t.nodeName.toLowerCase();"input"===n&&Ce.test(e.type)?t.checked=e.checked:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}function b(t,n){var r,i=G(n.createElement(t)).appendTo(n.body),o=e.getDefaultComputedStyle&&(r=e.getDefaultComputedStyle(i[0]))?r.d
|
||
|
if(o.splice(i,1),e=r.length&&f(o),!e)return J.apply(n,r),n;break}}return(l||E(e,d))(r,t,!$,n,be.test(e)&&u(t.parentNode)||t),n},x.sortStable=I.split("").sort(Q).join("")===I,x.detectDuplicates=!!L,j(),x.sortDetached=i(function(e){return 1&e.compareDocumentPosition(M.createElement("div"))}),i(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,n){return n?void 0:e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),x.attributes&&i(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||o("value",function(e,t,n){return n||"input"!==e.nodeName.toLowerCase()?void 0:e.defaultValue}),i(function(e){return null==e.getAttribute("disabled")})||o(te,function(e,t,n){var r;return n?void 0:e[t]===!0?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),t}(e);G.find=ie,G.expr=ie.selectors,G.expr[":"]=G.expr.pseudos,G.unique=ie.uniqueSort,G.text=ie.getText,G.isXMLDoc=ie.isXML,G.contains=ie.contains;var oe=G.expr.match.needsContext,se=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,ae=/^.[^:#\[\.,]*$/;G.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?G.find.matchesSelector(r,e)?[r]:[]:G.find.matches(e,G.grep(t,function(e){return 1===e.nodeType}))},G.fn.extend({find:function(e){var t,n=this.length,r=[],i=this;if("string"!=typeof e)return this.pushStack(G(e).filter(function(){for(t=0;n>t;t++)if(G.contains(i[t],this))return!0}));for(t=0;n>t;t++)G.find(e,i[t],r);return r=this.pushStack(n>1?G.unique(r):r),r.selector=this.selector?this.selector+" "+e:e,r},filter:function(e){return this.pushStack(r(this,e||[],!1))},not:function(e){return this.pushStack(r(this,e||[],!0))},is:function(e){return!!r(this,"string"==typeof e&&oe.test(e)?G(e):e||[],!1).length}});var ce,le=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,ue=G.fn.init=function(e,t){var n,r;if(!e)return this;if("string"==typeof e){if(n="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:le.exec(e),!n||!n[1]&&t)return!t||t.jquery?(t||ce).find(e):this.constructor(t).find(e);if(n[1]){if(t=t instanceof G?t[0]:t,G.merge(this,G.parseHTML(n[1],t&&t.nodeType?t.ownerDocument||t:Y,!0)),se.test(n[1])&&G.isPlainObject(t))for(n in t)G.isFunction(this[n])?this[n](t[n]):this.attr(n,t[n]);return this}return r=Y.getElementById(n[2]),r&&r.parentNode&&(this.length=1,this[0]=r),this.context=Y,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):G.isFunction(e)?"undefined"!=typeof ce.ready?ce.ready(e):e(G):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),G.makeArray(e,this))};ue.prototype=G.fn,ce=G(Y);var de=/^(?:parents|prev(?:Until|All))/,fe={children:!0,contents:!0,next:!0,prev:!0};G.extend({dir:function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&G(e).is(n))break;r.push(e)}return r},sibling:function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}}),G.fn.extend({has:function(e){var t=G(e,this),n=t.length;return this.filter(function(){for(var e=0;n>e;e++)if(G.contains(this,t[e]))return!0})},closest:function(e,t){for(var n,r=0,i=this.length,o=[],s=oe.test(e)||"string"!=typeof e?G(e,t||this.context):0;i>r;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(s?s.index(n)>-1:1===n.nodeType&&G.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?G.unique(o):o)},index:function(e){return e?"string"==typeof e?Q.call(G(e),this[0]):Q.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(G.unique(G.merge(this.get(),G(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),G.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return G.dir(e,"parentNode")},parentsUntil:function(e,t,n){return G.dir(e,"parentNode",n)},next:function(e){return i(e,"nextSibling")},prev:function(e){return i(e,"previousSibling")},nextAll:function(e){re
|
||
|
complete:n||!n&&t||G.isFunction(e)&&e,duration:e,easing:n&&t||t&&!G.isFunction(t)&&t};return r.duration=G.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in G.fx.speeds?G.fx.speeds[r.duration]:G.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){G.isFunction(r.old)&&r.old.call(this),r.queue&&G.dequeue(this,r.queue)},r},G.fn.extend({fadeTo:function(e,t,n,r){return this.filter(ke).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=G.isEmptyObject(e),o=G.speed(t,n,r),s=function(){var t=$(this,G.extend({},e),o);(i||ve.get(this,"finish"))&&t.stop(!0)};return s.finish=s,i||o.queue===!1?this.each(s):this.queue(o.queue,s)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,i=null!=e&&e+"queueHooks",o=G.timers,s=ve.get(this);if(i)s[i]&&s[i].stop&&r(s[i]);else for(i in s)s[i]&&s[i].stop&&et.test(i)&&r(s[i]);for(i=o.length;i--;)o[i].elem!==this||null!=e&&o[i].queue!==e||(o[i].anim.stop(n),t=!1,o.splice(i,1));(t||!n)&&G.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=ve.get(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=G.timers,s=r?r.length:0;for(n.finish=!0,G.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;s>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}}),G.each(["toggle","show","hide"],function(e,t){var n=G.fn[t];G.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(L(t,!0),e,r,i)}}),G.each({slideDown:L("show"),slideUp:L("hide"),slideToggle:L("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){G.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),G.timers=[],G.fx.tick=function(){var e,t=0,n=G.timers;for(Ze=G.now();t<n.length;t++)e=n[t],e()||n[t]!==e||n.splice(t--,1);n.length||G.fx.stop(),Ze=void 0},G.fx.timer=function(e){G.timers.push(e),e()?G.fx.start():G.timers.pop()},G.fx.interval=13,G.fx.start=function(){Ye||(Ye=setInterval(G.fx.tick,G.fx.interval))},G.fx.stop=function(){clearInterval(Ye),Ye=null},G.fx.speeds={slow:600,fast:200,_default:400},G.fn.delay=function(e,t){return e=G.fx?G.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},function(){var e=Y.createElement("input"),t=Y.createElement("select"),n=t.appendChild(Y.createElement("option"));e.type="checkbox",Z.checkOn=""!==e.value,Z.optSelected=n.selected,t.disabled=!0,Z.optDisabled=!n.disabled,e=Y.createElement("input"),e.value="t",e.type="radio",Z.radioValue="t"===e.value}();var rt,it,ot=G.expr.attrHandle;G.fn.extend({attr:function(e,t){return me(this,G.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){G.removeAttr(this,e)})}}),G.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(e&&3!==o&&8!==o&&2!==o)return typeof e.getAttribute===Ne?G.prop(e,t,n):(1===o&&G.isXMLDoc(e)||(t=t.toLowerCase(),r=G.attrHooks[t]||(G.expr.match.bool.test(t)?it:rt)),void 0===n?r&&"get"in r&&null!==(i=r.get(e,t))?i:(i=G.find.attr(e,t),null==i?void 0:i):null!==n?r&&"set"in r&&void 0!==(i=r.set(e,n,t))?i:(e.setAttribute(t,n+""),n):void G.removeAttr(e,t))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(pe);if(o&&1===e.nodeType)for(;n=o[i++];)r=G.propFix[n]||n,G.expr.match.bool.test(n)&&(e[r]=!1),e.removeAttribute(n)},attrHooks:{type:{set:function(e,t){if(!Z.radioValue&&"radio"===t&&G.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}}}),it={set:function(e,t,n){return t===!1?G.removeAttr(e,n):e.setAttribute(n,n),n}},G.each(G.expr.match.bool.source.match(/\w+/g),function(e,t){var n=ot[t]||G.find.attr;ot[t]=function(e,t,r){var i,o;return r||(o=ot[t],ot[t]=i,i=null!=n(e,t,r)?t.toLowerCase():null,ot[t]=o),i}});var st=/^(?:input|select|textarea|button)$/i;G.fn.extend({prop:function(e,t){return
|
||
|
}function v(e,n){var r=e.cN?p(e.cN,"",!0):"";e.rB?(E+=r,S=""):e.eB?(E+=t(n)+r,S=""):(E+=r,S=n),C=Object.create(e,{parent:{value:C}})}function y(e,n){if(S+=e,void 0===n)return E+=m(),0;var r=s(n,C);if(r)return E+=m(),v(r,n),r.rB?0:n.length;var i=a(C,n);if(i){var o=C;o.rE||o.eE||(S+=n),E+=m();do C.cN&&(E+="</span>"),T+=C.r,C=C.parent;while(C!=i.parent);return o.eE&&(E+=t(n)),S="",i.starts&&v(i.starts,""),o.rE?0:n.length}if(c(n,C))throw new Error('Illegal lexeme "'+n+'" for mode "'+(C.cN||"<unnamed>")+'"');return S+=n,n.length||1}var b=w(e);if(!b)throw new Error('Unknown language: "'+e+'"');l(b);var k,C=o||b,N={},E="";for(k=C;k!=b;k=k.parent)k.cN&&(E=p(k.cN,"",!0)+E);var S="",T=0;try{for(var A,L,j=0;C.t.lastIndex=j,A=C.t.exec(n),A;)L=y(n.substr(j,A.index-j),A[0]),j=A.index+L;for(y(n.substr(j)),k=C;k.parent;k=k.parent)k.cN&&(E+="</span>");return{r:T,value:E,language:e,top:C}}catch(M){if(-1!=M.message.indexOf("Illegal"))return{r:0,value:t(n)};throw M}}function d(e,n){n=n||x.languages||Object.keys(_);var r={r:0,value:t(e)},i=r;return n.forEach(function(t){if(w(t)){var n=u(t,e,!1);n.language=t,n.r>i.r&&(i=n),n.r>r.r&&(i=r,r=n)}}),i.language&&(r.second_best=i),r}function f(e){return x.tabReplace&&(e=e.replace(/^((<[^>]+>|\t)+)/gm,function(e,t){return t.replace(/\t/g,x.tabReplace)})),x.useBR&&(e=e.replace(/\n/g,"<br>")),e}function p(e,t,n){var r=t?k[t]:n,i=[e.trim()];return e.match(/\bhljs\b/)||i.push("hljs"),-1===e.indexOf(r)&&i.push(r),i.join(" ").trim()}function h(e){var t=o(e);if(!i(t)){var n;x.useBR?(n=document.createElementNS("http://www.w3.org/1999/xhtml","div"),n.innerHTML=e.innerHTML.replace(/\n/g,"").replace(/<br[ \/]*>/g,"\n")):n=e;var r=n.textContent,s=t?u(t,r,!0):d(r),l=a(n);if(l.length){var h=document.createElementNS("http://www.w3.org/1999/xhtml","div");h.innerHTML=s.value,s.value=c(l,a(h),r)}s.value=f(s.value),e.innerHTML=s.value,e.className=p(e.className,t,s.language),e.result={language:s.language,re:s.r},s.second_best&&(e.second_best={language:s.second_best.language,re:s.second_best.r})}}function g(e){x=s(x,e)}function m(){if(!m.called){m.called=!0;var e=document.querySelectorAll("pre code");Array.prototype.forEach.call(e,h)}}function v(){addEventListener("DOMContentLoaded",m,!1),addEventListener("load",m,!1)}function y(t,n){var r=_[t]=n(e);r.aliases&&r.aliases.forEach(function(e){k[e]=t})}function b(){return Object.keys(_)}function w(e){return e=(e||"").toLowerCase(),_[e]||_[k[e]]}var x={classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:void 0},_={},k={};return e.highlight=u,e.highlightAuto=d,e.fixMarkup=f,e.highlightBlock=h,e.configure=g,e.initHighlighting=m,e.initHighlightingOnLoad=v,e.registerLanguage=y,e.listLanguages=b,e.getLanguage=w,e.inherit=s,e.IR="[a-zA-Z]\\w*",e.UIR="[a-zA-Z_]\\w*",e.NR="\\b\\d+(\\.\\d+)?",e.CNR="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",e.BNR="\\b(0b[01]+)",e.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",e.BE={b:"\\\\[\\s\\S]",r:0},e.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[e.BE]},e.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[e.BE]},e.PWM={b:/\b(a|an|the|are|I|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|like)\b/},e.C=function(t,n,r){var i=e.inherit({cN:"comment",b:t,e:n,c:[]},r||{});return i.c.push(e.PWM),i.c.push({cN:"doctag",b:"(?:TODO|FIXME|NOTE|BUG|XXX):",r:0}),i},e.CLCM=e.C("//","$"),e.CBCM=e.C("/\\*","\\*/"),e.HCM=e.C("#","$"),e.NM={cN:"number",b:e.NR,r:0},e.CNM={cN:"number",b:e.CNR,r:0},e.BNM={cN:"number",b:e.BNR,r:0},e.CSSNM={cN:"number",b:e.NR+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",r:0},e.RM={cN:"regexp",b:/\//,e:/\/[gimuy]*/,i:/\n/,c:[e.BE,{b:/\[/,e:/\]/,r:0,c:[e.BE]}]},e.TM={cN:"title",b:e.IR,r:0},e.UTM={cN:"title",b:e.UIR,r:0},e.registerLanguage("apache",function(e){var t={cN:"number",b:"[\\$%]\\d+"};return{aliases:["apacheconf"],cI:!0,c:[e.HCM,{cN:"section",b:"</?",e:">"},{cN:"attribute",b:/\w+/,r:0,k:{nomarkup:"order deny
|
||
|
literal:"true false null",built_in:"array bigint binary bit blob boolean char character date dec decimal float int int8 integer interval number numeric real record serial serial8 smallint text varchar varying void"},c:[{cN:"string",b:"'",e:"'",c:[e.BE,{b:"''"}]},{cN:"string",b:'"',e:'"',c:[e.BE,{b:'""'}]},{cN:"string",b:"`",e:"`",c:[e.BE]},e.CNM,e.CBCM,t]},e.CBCM,t]}}),e}),jQuery.extend({highlight:function(e,t,n,r){if(3===e.nodeType){var i=e.data.match(t);if(i){var o=document.createElement(n||"span");o.className=r||"highlight";var s=e.splitText(i.index);s.splitText(i[0].length);var a=s.cloneNode(!0);return o.appendChild(a),s.parentNode.replaceChild(o,s),1}}else if(1===e.nodeType&&e.childNodes&&!/(script|style)/i.test(e.tagName)&&(e.tagName!==n.toUpperCase()||e.className!==r))for(var c=0;c<e.childNodes.length;c++)c+=jQuery.highlight(e.childNodes[c],t,n,r);return 0}}),jQuery.fn.unhighlight=function(e){var t={className:"highlight",element:"span"};return jQuery.extend(t,e),this.find(t.element+"."+t.className).each(function(){var e=this.parentNode;e.replaceChild(this.firstChild,this),e.normalize()}).end()},jQuery.fn.highlight=function(e,t){var n={className:"highlight",element:"span",caseSensitive:!1,wordsOnly:!1};if(jQuery.extend(n,t),e.constructor===String&&(e=[e]),e=jQuery.grep(e,function(e,t){return""!=e}),e=jQuery.map(e,function(e,t){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}),0==e.length)return this;var r=n.caseSensitive?"":"i",i="("+e.join("|")+")";n.wordsOnly&&(i="\\b"+i+"\\b");var o=new RegExp(i,r);return this.each(function(){jQuery.highlight(this,o,n.element,n.className)})},function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e(jQuery)}(function(e){var t=0,n=Array.prototype.slice;e.cleanData=function(t){return function(n){var r,i,o;for(o=0;null!=(i=n[o]);o++)try{r=e._data(i,"events"),r&&r.remove&&e(i).triggerHandler("remove")}catch(s){}t(n)}}(e.cleanData),e.widget=function(t,n,r){var i,o,s,a,c={},l=t.split(".")[0];return t=t.split(".")[1],i=l+"-"+t,r||(r=n,n=e.Widget),e.expr[":"][i.toLowerCase()]=function(t){return!!e.data(t,i)},e[l]=e[l]||{},o=e[l][t],s=e[l][t]=function(e,t){return this._createWidget?void(arguments.length&&this._createWidget(e,t)):new s(e,t)},e.extend(s,o,{version:r.version,_proto:e.extend({},r),_childConstructors:[]}),a=new n,a.options=e.widget.extend({},a.options),e.each(r,function(t,r){return e.isFunction(r)?void(c[t]=function(){var e=function(){return n.prototype[t].apply(this,arguments)},i=function(e){return n.prototype[t].apply(this,e)};return function(){var t,n=this._super,o=this._superApply;return this._super=e,this._superApply=i,t=r.apply(this,arguments),this._super=n,this._superApply=o,t}}()):void(c[t]=r)}),s.prototype=e.widget.extend(a,{widgetEventPrefix:o?a.widgetEventPrefix||t:t},c,{constructor:s,namespace:l,widgetName:t,widgetFullName:i}),o?(e.each(o._childConstructors,function(t,n){var r=n.prototype;e.widget(r.namespace+"."+r.widgetName,s,n._proto)}),delete o._childConstructors):n._childConstructors.push(s),e.widget.bridge(t,s),s},e.widget.extend=function(t){for(var r,i,o=n.call(arguments,1),s=0,a=o.length;s<a;s++)for(r in o[s])i=o[s][r],o[s].hasOwnProperty(r)&&void 0!==i&&(e.isPlainObject(i)?t[r]=e.isPlainObject(t[r])?e.widget.extend({},t[r],i):e.widget.extend({},i):t[r]=i);return t},e.widget.bridge=function(t,r){var i=r.prototype.widgetFullName||t;e.fn[t]=function(o){var s="string"==typeof o,a=n.call(arguments,1),c=this;return s?this.each(function(){var n,r=e.data(this,i);return"instance"===o?(c=r,!1):r?e.isFunction(r[o])&&"_"!==o.charAt(0)?(n=r[o].apply(r,a),n!==r&&void 0!==n?(c=n&&n.jquery?c.pushStack(n.get()):n,!1):void 0):e.error("no such method '"+o+"' for "+t+" widget instance"):e.error("cannot call methods on "+t+" prior to initialization; attempted to call method '"+o+"'")}):(a.length&&(o=e.widget.extend.apply(null,[o].concat(a))),this.each(function(){var t=e.data(this,i);t?(t.option(o||{}),t._init&&t._init()):e.data(this,i,new r(o,this))})),c}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEve
|
||
|
}function l(){setTimeout(function(){toc.setOption("showEffectSpeed",180)},50)}hljs.initHighlightingOnLoad();var u=[];e.setupLanguages=a,e.activateLanguage=t,$(function(){$("h1, h2").each(function(){$(this).prop("id",c($(this).text()))}),$(".lang-selector a").on("click",function(){var e=$(this).data("language-name");return s(e),t(e),!1}),window.onpopstate=function(){t(i())}});var d=function(){$(".tocify-wrapper").removeClass("open"),$("#nav-button").removeClass("open")},f=function(){e.toc=$("#toc").tocify({selectors:"h1, h2",extendPage:!1,theme:"none",smoothScroll:!1,showEffectSpeed:0,hideEffectSpeed:180,ignoreSelector:".toc-ignore",highlightOffset:60,scrollTo:-1,scrollHistory:!0,hashGenerator:function(e,t){return t.prop("id")}}).data("toc-tocify"),$("#nav-button").click(function(){return $(".tocify-wrapper").toggleClass("open"),$("#nav-button").toggleClass("open"),!1}),$(".page-wrapper").click(d),$(".tocify-item").click(d)};$(function(){f(),l(),$(".content").imagesLoaded(function(){e.toc.calculateHeights()})})}(window),function(){"use strict";function e(){$("h1, h2").each(function(){var e=$(this),t=e.nextUntil("h1, h2");c.add({id:e.prop("id"),title:e.text(),body:t.text()})})}function t(){o=$(".content"),s=$(".search-results"),$("#input-search").on("keyup",n)}function n(e){if(i(),s.addClass("visible"),27===e.keyCode&&(this.value=""),this.value){var t=c.search(this.value).filter(function(e){return e.score>1e-4});t.length?(s.empty(),$.each(t,function(e,t){var n=document.getElementById(t.ref);s.append("<li><a href='#"+t.ref+"'>"+$(n).text()+"</a></li>")}),r.call(this)):(s.html("<li></li>"),$(".search-results li").text('No Results Found for "'+this.value+'"'))}else i(),s.removeClass("visible")}function r(){this.value&&o.highlight(this.value,a)}function i(){o.unhighlight(a)}var o,s,a={element:"span",className:"search-highlight"},c=new lunr.Index;c.ref("id"),c.field("title",{boost:10}),c.field("body"),c.pipeline.add(lunr.trimmer,lunr.stopWordFilter),$(e),$(t)}();
|