7 lines
18 KiB
JavaScript
7 lines
18 KiB
JavaScript
var b=(y,v)=>()=>(v||y((v={exports:{}}).exports,v),v.exports);var T=b((E,k)=>{/*!***************************************************
|
||
* mark.js v8.11.1
|
||
* https://markjs.io/
|
||
* Copyright (c) 2014–2018, Julian Kühnel
|
||
* Released under the MIT license https://git.io/vwTVl
|
||
*****************************************************/(function(y,v){typeof E=="object"&&typeof k<"u"?k.exports=v():typeof define=="function"&&define.amd?define(v):y.Mark=v()})(E,function(){"use strict";var y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(f){return typeof f}:function(f){return f&&typeof Symbol=="function"&&f.constructor===Symbol&&f!==Symbol.prototype?"symbol":typeof f},v=function(f,o){if(!(f instanceof o))throw new TypeError("Cannot call a class as a function")},I=function(){function f(o,e){for(var n=0;n<e.length;n++){var t=e[n];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(o,t.key,t)}}return function(o,e,n){return e&&f(o.prototype,e),n&&f(o,n),o}}(),N=Object.assign||function(f){for(var o=1;o<arguments.length;o++){var e=arguments[o];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(f[n]=e[n])}return f},x=function(){function f(o){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:5e3;v(this,f),this.ctx=o,this.iframes=e,this.exclude=n,this.iframesTimeout=t}return I(f,[{key:"getContexts",value:function(){var e=void 0,n=[];return typeof this.ctx>"u"||!this.ctx?e=[]:NodeList.prototype.isPrototypeOf(this.ctx)?e=Array.prototype.slice.call(this.ctx):Array.isArray(this.ctx)?e=this.ctx:typeof this.ctx=="string"?e=Array.prototype.slice.call(document.querySelectorAll(this.ctx)):e=[this.ctx],e.forEach(function(t){var a=n.filter(function(r){return r.contains(t)}).length>0;n.indexOf(t)===-1&&!a&&n.push(t)}),n}},{key:"getIframeContents",value:function(e,n){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){},a=void 0;try{var r=e.contentWindow;if(a=r.document,!r||!a)throw new Error("iframe inaccessible")}catch{t()}a&&n(a)}},{key:"isIframeBlank",value:function(e){var n="about:blank",t=e.getAttribute("src").trim(),a=e.contentWindow.location.href;return a===n&&t!==n&&t}},{key:"observeIframeLoad",value:function(e,n,t){var a=this,r=!1,s=null,i=function c(){if(!r){r=!0,clearTimeout(s);try{a.isIframeBlank(e)||(e.removeEventListener("load",c),a.getIframeContents(e,n,t))}catch{t()}}};e.addEventListener("load",i),s=setTimeout(i,this.iframesTimeout)}},{key:"onIframeReady",value:function(e,n,t){try{e.contentWindow.document.readyState==="complete"?this.isIframeBlank(e)?this.observeIframeLoad(e,n,t):this.getIframeContents(e,n,t):this.observeIframeLoad(e,n,t)}catch{t()}}},{key:"waitForIframes",value:function(e,n){var t=this,a=0;this.forEachIframe(e,function(){return!0},function(r){a++,t.waitForIframes(r.querySelector("html"),function(){--a||n()})},function(r){r||n()})}},{key:"forEachIframe",value:function(e,n,t){var a=this,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:function(){},s=e.querySelectorAll("iframe"),i=s.length,c=0;s=Array.prototype.slice.call(s);var u=function(){--i<=0&&r(c)};i||u(),s.forEach(function(l){f.matches(l,a.exclude)?u():a.onIframeReady(l,function(h){n(l)&&(c++,t(h)),u()},u)})}},{key:"createIterator",value:function(e,n,t){return document.createNodeIterator(e,n,t,!1)}},{key:"createInstanceOnIframe",value:function(e){return new f(e.querySelector("html"),this.iframes)}},{key:"compareNodeIframe",value:function(e,n,t){var a=e.compareDocumentPosition(t),r=Node.DOCUMENT_POSITION_PRECEDING;if(a&r)if(n!==null){var s=n.compareDocumentPosition(t),i=Node.DOCUMENT_POSITION_FOLLOWING;if(s&i)return!0}else return!0;return!1}},{key:"getIteratorNode",value:function(e){var n=e.previousNode(),t=void 0;return n===null?t=e.nextNode():t=e.nextNode()&&e.nextNode(),{prevNode:n,node:t}}},{key:"checkIframeFilter",value:function(e,n,t,a){var r=!1,s=!1;return a.forEach(function(i,c){i.val===t&&(r=c,s=i.handled)}),this.compareNodeIframe(e,n,t)?(r===!1&&!s?a.push({val:t,handled:!0}):r!==!1&&!s&&(a[r].handled=!0),!0):(r===!1&&a.push({val:t,handled:!1}),!1)}},{key:"handleOpenIframes",value:function(e,n,t,a){var r=this;e.forEach(function(s){s.handled||r.getIframeContents(s.val,function(i){r.createInstanceOnIframe(i).forEachNode(n,t,a)})})}},{key:"iterateThroughNodes",value:function(e,n,t,a,r){for(var s=this,i=this.createIterator(n,e,a),c=[],u=[],l=void 0,h=void 0,d=function(){var g=s.getIteratorNode(i);return h=g.prevNode,l=g.node,l};d();)this.iframes&&this.forEachIframe(n,function(p){return s.checkIframeFilter(l,h,p,c)},function(p){s.createInstanceOnIframe(p).forEachNode(e,function(g){return u.push(g)},a)}),u.push(l);u.forEach(function(p){t(p)}),this.iframes&&this.handleOpenIframes(c,e,t,a),r()}},{key:"forEachNode",value:function(e,n,t){var a=this,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:function(){},s=this.getContexts(),i=s.length;i||r(),s.forEach(function(c){var u=function(){a.iterateThroughNodes(e,c,n,t,function(){--i<=0&&r()})};a.iframes?a.waitForIframes(c,u):u()})}}],[{key:"matches",value:function(e,n){var t=typeof n=="string"?[n]:n,a=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector;if(a){var r=!1;return t.every(function(s){return a.call(e,s)?(r=!0,!1):!0}),r}else return!1}}]),f}(),R=function(){function f(o){v(this,f),this.ctx=o,this.ie=!1;var e=window.navigator.userAgent;(e.indexOf("MSIE")>-1||e.indexOf("Trident")>-1)&&(this.ie=!0)}return I(f,[{key:"log",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"debug",t=this.opt.log;this.opt.debug&&(typeof t>"u"?"undefined":y(t))==="object"&&typeof t[n]=="function"&&t[n]("mark.js: "+e)}},{key:"escapeStr",value:function(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}},{key:"createRegExp",value:function(e){return this.opt.wildcards!=="disabled"&&(e=this.setupWildcardsRegExp(e)),e=this.escapeStr(e),Object.keys(this.opt.synonyms).length&&(e=this.createSynonymsRegExp(e)),(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.setupIgnoreJoinersRegExp(e)),this.opt.diacritics&&(e=this.createDiacriticsRegExp(e)),e=this.createMergedBlanksRegExp(e),(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.createJoinersRegExp(e)),this.opt.wildcards!=="disabled"&&(e=this.createWildcardsRegExp(e)),e=this.createAccuracyRegExp(e),e}},{key:"createSynonymsRegExp",value:function(e){var n=this.opt.synonyms,t=this.opt.caseSensitive?"":"i",a=this.opt.ignoreJoiners||this.opt.ignorePunctuation.length?"\0":"";for(var r in n)if(n.hasOwnProperty(r)){var s=n[r],i=this.opt.wildcards!=="disabled"?this.setupWildcardsRegExp(r):this.escapeStr(r),c=this.opt.wildcards!=="disabled"?this.setupWildcardsRegExp(s):this.escapeStr(s);i!==""&&c!==""&&(e=e.replace(new RegExp("("+this.escapeStr(i)+"|"+this.escapeStr(c)+")","gm"+t),a+("("+this.processSynomyms(i)+"|")+(this.processSynomyms(c)+")")+a))}return e}},{key:"processSynomyms",value:function(e){return(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.setupIgnoreJoinersRegExp(e)),e}},{key:"setupWildcardsRegExp",value:function(e){return e=e.replace(/(?:\\)*\?/g,function(n){return n.charAt(0)==="\\"?"?":""}),e.replace(/(?:\\)*\*/g,function(n){return n.charAt(0)==="\\"?"*":""})}},{key:"createWildcardsRegExp",value:function(e){var n=this.opt.wildcards==="withSpaces";return e.replace(/\u0001/g,n?"[\\S\\s]?":"\\S?").replace(/\u0002/g,n?"[\\S\\s]*?":"\\S*")}},{key:"setupIgnoreJoinersRegExp",value:function(e){return e.replace(/[^(|)\\]/g,function(n,t,a){var r=a.charAt(t+1);return/[(|)\\]/.test(r)||r===""?n:n+"\0"})}},{key:"createJoinersRegExp",value:function(e){var n=[],t=this.opt.ignorePunctuation;return Array.isArray(t)&&t.length&&n.push(this.escapeStr(t.join(""))),this.opt.ignoreJoiners&&n.push("\\u00ad\\u200b\\u200c\\u200d"),n.length?e.split(/\u0000+/).join("["+n.join("")+"]*"):e}},{key:"createDiacriticsRegExp",value:function(e){var n=this.opt.caseSensitive?"":"i",t=this.opt.caseSensitive?["a\xE0\xE1\u1EA3\xE3\u1EA1\u0103\u1EB1\u1EAF\u1EB3\u1EB5\u1EB7\xE2\u1EA7\u1EA5\u1EA9\u1EAB\u1EAD\xE4\xE5\u0101\u0105","A\xC0\xC1\u1EA2\xC3\u1EA0\u0102\u1EB0\u1EAE\u1EB2\u1EB4\u1EB6\xC2\u1EA6\u1EA4\u1EA8\u1EAA\u1EAC\xC4\xC5\u0100\u0104","c\xE7\u0107\u010D","C\xC7\u0106\u010C","d\u0111\u010F","D\u0110\u010E","e\xE8\xE9\u1EBB\u1EBD\u1EB9\xEA\u1EC1\u1EBF\u1EC3\u1EC5\u1EC7\xEB\u011B\u0113\u0119","E\xC8\xC9\u1EBA\u1EBC\u1EB8\xCA\u1EC0\u1EBE\u1EC2\u1EC4\u1EC6\xCB\u011A\u0112\u0118","i\xEC\xED\u1EC9\u0129\u1ECB\xEE\xEF\u012B","I\xCC\xCD\u1EC8\u0128\u1ECA\xCE\xCF\u012A","l\u0142","L\u0141","n\xF1\u0148\u0144","N\xD1\u0147\u0143","o\xF2\xF3\u1ECF\xF5\u1ECD\xF4\u1ED3\u1ED1\u1ED5\u1ED7\u1ED9\u01A1\u1EDF\u1EE1\u1EDB\u1EDD\u1EE3\xF6\xF8\u014D","O\xD2\xD3\u1ECE\xD5\u1ECC\xD4\u1ED2\u1ED0\u1ED4\u1ED6\u1ED8\u01A0\u1EDE\u1EE0\u1EDA\u1EDC\u1EE2\xD6\xD8\u014C","r\u0159","R\u0158","s\u0161\u015B\u0219\u015F","S\u0160\u015A\u0218\u015E","t\u0165\u021B\u0163","T\u0164\u021A\u0162","u\xF9\xFA\u1EE7\u0169\u1EE5\u01B0\u1EEB\u1EE9\u1EED\u1EEF\u1EF1\xFB\xFC\u016F\u016B","U\xD9\xDA\u1EE6\u0168\u1EE4\u01AF\u1EEA\u1EE8\u1EEC\u1EEE\u1EF0\xDB\xDC\u016E\u016A","y\xFD\u1EF3\u1EF7\u1EF9\u1EF5\xFF","Y\xDD\u1EF2\u1EF6\u1EF8\u1EF4\u0178","z\u017E\u017C\u017A","Z\u017D\u017B\u0179"]:["a\xE0\xE1\u1EA3\xE3\u1EA1\u0103\u1EB1\u1EAF\u1EB3\u1EB5\u1EB7\xE2\u1EA7\u1EA5\u1EA9\u1EAB\u1EAD\xE4\xE5\u0101\u0105A\xC0\xC1\u1EA2\xC3\u1EA0\u0102\u1EB0\u1EAE\u1EB2\u1EB4\u1EB6\xC2\u1EA6\u1EA4\u1EA8\u1EAA\u1EAC\xC4\xC5\u0100\u0104","c\xE7\u0107\u010DC\xC7\u0106\u010C","d\u0111\u010FD\u0110\u010E","e\xE8\xE9\u1EBB\u1EBD\u1EB9\xEA\u1EC1\u1EBF\u1EC3\u1EC5\u1EC7\xEB\u011B\u0113\u0119E\xC8\xC9\u1EBA\u1EBC\u1EB8\xCA\u1EC0\u1EBE\u1EC2\u1EC4\u1EC6\xCB\u011A\u0112\u0118","i\xEC\xED\u1EC9\u0129\u1ECB\xEE\xEF\u012BI\xCC\xCD\u1EC8\u0128\u1ECA\xCE\xCF\u012A","l\u0142L\u0141","n\xF1\u0148\u0144N\xD1\u0147\u0143","o\xF2\xF3\u1ECF\xF5\u1ECD\xF4\u1ED3\u1ED1\u1ED5\u1ED7\u1ED9\u01A1\u1EDF\u1EE1\u1EDB\u1EDD\u1EE3\xF6\xF8\u014DO\xD2\xD3\u1ECE\xD5\u1ECC\xD4\u1ED2\u1ED0\u1ED4\u1ED6\u1ED8\u01A0\u1EDE\u1EE0\u1EDA\u1EDC\u1EE2\xD6\xD8\u014C","r\u0159R\u0158","s\u0161\u015B\u0219\u015FS\u0160\u015A\u0218\u015E","t\u0165\u021B\u0163T\u0164\u021A\u0162","u\xF9\xFA\u1EE7\u0169\u1EE5\u01B0\u1EEB\u1EE9\u1EED\u1EEF\u1EF1\xFB\xFC\u016F\u016BU\xD9\xDA\u1EE6\u0168\u1EE4\u01AF\u1EEA\u1EE8\u1EEC\u1EEE\u1EF0\xDB\xDC\u016E\u016A","y\xFD\u1EF3\u1EF7\u1EF9\u1EF5\xFFY\xDD\u1EF2\u1EF6\u1EF8\u1EF4\u0178","z\u017E\u017C\u017AZ\u017D\u017B\u0179"],a=[];return e.split("").forEach(function(r){t.every(function(s){if(s.indexOf(r)!==-1){if(a.indexOf(s)>-1)return!1;e=e.replace(new RegExp("["+s+"]","gm"+n),"["+s+"]"),a.push(s)}return!0})}),e}},{key:"createMergedBlanksRegExp",value:function(e){return e.replace(/[\s]+/gmi,"[\\s]+")}},{key:"createAccuracyRegExp",value:function(e){var n=this,t="!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~\xA1\xBF",a=this.opt.accuracy,r=typeof a=="string"?a:a.value,s=typeof a=="string"?[]:a.limiters,i="";switch(s.forEach(function(c){i+="|"+n.escapeStr(c)}),r){case"partially":default:return"()("+e+")";case"complementary":return i="\\s"+(i||this.escapeStr(t)),"()([^"+i+"]*"+e+"[^"+i+"]*)";case"exactly":return"(^|\\s"+i+")("+e+")(?=$|\\s"+i+")"}}},{key:"getSeparatedKeywords",value:function(e){var n=this,t=[];return e.forEach(function(a){n.opt.separateWordSearch?a.split(" ").forEach(function(r){r.trim()&&t.indexOf(r)===-1&&t.push(r)}):a.trim()&&t.indexOf(a)===-1&&t.push(a)}),{keywords:t.sort(function(a,r){return r.length-a.length}),length:t.length}}},{key:"isNumeric",value:function(e){return Number(parseFloat(e))==e}},{key:"checkRanges",value:function(e){var n=this;if(!Array.isArray(e)||Object.prototype.toString.call(e[0])!=="[object Object]")return this.log("markRanges() will only accept an array of objects"),this.opt.noMatch(e),[];var t=[],a=0;return e.sort(function(r,s){return r.start-s.start}).forEach(function(r){var s=n.callNoMatchOnInvalidRanges(r,a),i=s.start,c=s.end,u=s.valid;u&&(r.start=i,r.length=c-i,t.push(r),a=c)}),t}},{key:"callNoMatchOnInvalidRanges",value:function(e,n){var t=void 0,a=void 0,r=!1;return e&&typeof e.start<"u"?(t=parseInt(e.start,10),a=t+parseInt(e.length,10),this.isNumeric(e.start)&&this.isNumeric(e.length)&&a-n>0&&a-t>0?r=!0:(this.log("Ignoring invalid or overlapping range: "+(""+JSON.stringify(e))),this.opt.noMatch(e))):(this.log("Ignoring invalid range: "+JSON.stringify(e)),this.opt.noMatch(e)),{start:t,end:a,valid:r}}},{key:"checkWhitespaceRanges",value:function(e,n,t){var a=void 0,r=!0,s=t.length,i=n-s,c=parseInt(e.start,10)-i;return c=c>s?s:c,a=c+parseInt(e.length,10),a>s&&(a=s,this.log("End range automatically set to the max value of "+s)),c<0||a-c<0||c>s||a>s?(r=!1,this.log("Invalid range: "+JSON.stringify(e)),this.opt.noMatch(e)):t.substring(c,a).replace(/\s+/g,"")===""&&(r=!1,this.log("Skipping whitespace only range: "+JSON.stringify(e)),this.opt.noMatch(e)),{start:c,end:a,valid:r}}},{key:"getTextNodes",value:function(e){var n=this,t="",a=[];this.iterator.forEachNode(NodeFilter.SHOW_TEXT,function(r){a.push({start:t.length,end:(t+=r.textContent).length,node:r})},function(r){return n.matchesExclude(r.parentNode)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT},function(){e({value:t,nodes:a})})}},{key:"matchesExclude",value:function(e){return x.matches(e,this.opt.exclude.concat(["script","style","title","head","html"]))}},{key:"wrapRangeInTextNode",value:function(e,n,t){var a=this.opt.element?this.opt.element:"mark",r=e.splitText(n),s=r.splitText(t-n),i=document.createElement(a);return i.setAttribute("data-markjs","true"),this.opt.className&&i.setAttribute("class",this.opt.className),i.textContent=r.textContent,r.parentNode.replaceChild(i,r),s}},{key:"wrapRangeInMappedTextNode",value:function(e,n,t,a,r){var s=this;e.nodes.every(function(i,c){var u=e.nodes[c+1];if(typeof u>"u"||u.start>n){if(!a(i.node))return!1;var l=n-i.start,h=(t>i.end?i.end:t)-i.start,d=e.value.substr(0,i.start),p=e.value.substr(h+i.start);if(i.node=s.wrapRangeInTextNode(i.node,l,h),e.value=d+p,e.nodes.forEach(function(g,m){m>=c&&(e.nodes[m].start>0&&m!==c&&(e.nodes[m].start-=h),e.nodes[m].end-=h)}),t-=h,r(i.node.previousSibling,i.start),t>i.end)n=i.end;else return!1}return!0})}},{key:"wrapMatches",value:function(e,n,t,a,r){var s=this,i=n===0?0:n+1;this.getTextNodes(function(c){c.nodes.forEach(function(u){u=u.node;for(var l=void 0;(l=e.exec(u.textContent))!==null&&l[i]!=="";)if(t(l[i],u)){var h=l.index;if(i!==0)for(var d=1;d<i;d++)h+=l[d].length;u=s.wrapRangeInTextNode(u,h,h+l[i].length),a(u.previousSibling),e.lastIndex=0}}),r()})}},{key:"wrapMatchesAcrossElements",value:function(e,n,t,a,r){var s=this,i=n===0?0:n+1;this.getTextNodes(function(c){for(var u=void 0;(u=e.exec(c.value))!==null&&u[i]!=="";){var l=u.index;if(i!==0)for(var h=1;h<i;h++)l+=u[h].length;var d=l+u[i].length;s.wrapRangeInMappedTextNode(c,l,d,function(p){return t(u[i],p)},function(p,g){e.lastIndex=g,a(p)})}r()})}},{key:"wrapRangeFromIndex",value:function(e,n,t,a){var r=this;this.getTextNodes(function(s){var i=s.value.length;e.forEach(function(c,u){var l=r.checkWhitespaceRanges(c,i,s.value),h=l.start,d=l.end,p=l.valid;p&&r.wrapRangeInMappedTextNode(s,h,d,function(g){return n(g,c,s.value.substring(h,d),u)},function(g){t(g,c)})}),a()})}},{key:"unwrapMatches",value:function(e){for(var n=e.parentNode,t=document.createDocumentFragment();e.firstChild;)t.appendChild(e.removeChild(e.firstChild));n.replaceChild(t,e),this.ie?this.normalizeTextNode(n):n.normalize()}},{key:"normalizeTextNode",value:function(e){if(e){if(e.nodeType===3)for(;e.nextSibling&&e.nextSibling.nodeType===3;)e.nodeValue+=e.nextSibling.nodeValue,e.parentNode.removeChild(e.nextSibling);else this.normalizeTextNode(e.firstChild);this.normalizeTextNode(e.nextSibling)}}},{key:"markRegExp",value:function(e,n){var t=this;this.opt=n,this.log('Searching with expression "'+e+'"');var a=0,r="wrapMatches",s=function(c){a++,t.opt.each(c)};this.opt.acrossElements&&(r="wrapMatchesAcrossElements"),this[r](e,this.opt.ignoreGroups,function(i,c){return t.opt.filter(c,i,a)},s,function(){a===0&&t.opt.noMatch(e),t.opt.done(a)})}},{key:"mark",value:function(e,n){var t=this;this.opt=n;var a=0,r="wrapMatches",s=this.getSeparatedKeywords(typeof e=="string"?[e]:e),i=s.keywords,c=s.length,u=this.opt.caseSensitive?"":"i",l=function h(d){var p=new RegExp(t.createRegExp(d),"gm"+u),g=0;t.log('Searching with expression "'+p+'"'),t[r](p,1,function(m,w){return t.opt.filter(w,d,a,g)},function(m){g++,a++,t.opt.each(m)},function(){g===0&&t.opt.noMatch(d),i[c-1]===d?t.opt.done(a):h(i[i.indexOf(d)+1])})};this.opt.acrossElements&&(r="wrapMatchesAcrossElements"),c===0?this.opt.done(a):l(i[0])}},{key:"markRanges",value:function(e,n){var t=this;this.opt=n;var a=0,r=this.checkRanges(e);r&&r.length?(this.log("Starting to mark with the following ranges: "+JSON.stringify(r)),this.wrapRangeFromIndex(r,function(s,i,c,u){return t.opt.filter(s,i,c,u)},function(s,i){a++,t.opt.each(s,i)},function(){t.opt.done(a)})):this.opt.done(a)}},{key:"unmark",value:function(e){var n=this;this.opt=e;var t=this.opt.element?this.opt.element:"*";t+="[data-markjs]",this.opt.className&&(t+="."+this.opt.className),this.log('Removal selector "'+t+'"'),this.iterator.forEachNode(NodeFilter.SHOW_ELEMENT,function(a){n.unwrapMatches(a)},function(a){var r=x.matches(a,t),s=n.matchesExclude(a);return!r||s?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT},this.opt.done)}},{key:"opt",set:function(e){this._opt=N({},{element:"",className:"",exclude:[],iframes:!1,iframesTimeout:5e3,separateWordSearch:!0,diacritics:!0,synonyms:{},accuracy:"partially",acrossElements:!1,caseSensitive:!1,ignoreJoiners:!1,ignoreGroups:0,ignorePunctuation:[],wildcards:"disabled",each:function(){},noMatch:function(){},filter:function(){return!0},done:function(){},debug:!1,log:window.console},e)},get:function(){return this._opt}},{key:"iterator",get:function(){return new x(this.ctx,this.opt.iframes,this.opt.exclude,this.opt.iframesTimeout)}}]),f}();function S(f){var o=this,e=new R(f);return this.mark=function(n,t){return e.mark(n,t),o},this.markRegExp=function(n,t){return e.markRegExp(n,t),o},this.markRanges=function(n,t){return e.markRanges(n,t),o},this.unmark=function(n){return e.unmark(n),o},this}return S})});export default T();
|