UNPKG

accoutrement-color

Version:

Sass color-palette management and utilities.

27 lines 89.3 kB
(window.webpackJsonp=window.webpackJsonp||[]).push([[4],[function(e,t,r){var n=r(28)("wks"),i=r(9),o=r(1).Symbol,s="function"==typeof o;(e.exports=function(e){return n[e]||(n[e]=s&&o[e]||(s?o:i)("Symbol."+e))}).store=n},function(e,t){var r=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=r)},function(e,t,r){var n=r(4),i=r(13);e.exports=r(6)?function(e,t,r){return n.f(e,t,i(1,r))}:function(e,t,r){return e[t]=r,e}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,r){var n=r(14),i=r(46),o=r(29),s=Object.defineProperty;t.f=r(6)?Object.defineProperty:function(e,t,r){if(n(e),t=o(t,!0),n(r),i)try{return s(e,t,r)}catch(e){}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(e[t]=r.value),e}},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,r){e.exports=!r(5)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t){var r={}.hasOwnProperty;e.exports=function(e,t){return r.call(e,t)}},function(e,t,r){var n=r(40),i=r(24);e.exports=function(e){return n(i(e))}},function(e,t){var r=0,n=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++r+n).toString(36))}},function(e,t,r){var n=r(1),i=r(2),o=r(7),s=r(9)("src"),a=Function.toString,u=(""+a).split("toString");r(30).inspectSource=function(e){return a.call(e)},(e.exports=function(e,t,r,a){var c="function"==typeof r;c&&(o(r,"name")||i(r,"name",t)),e[t]!==r&&(c&&(o(r,s)||i(r,s,e[t]?""+e[t]:u.join(String(t)))),e===n?e[t]=r:a?e[t]?e[t]=r:i(e,t,r):(delete e[t],i(e,t,r)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[s]||a.call(this)})},,function(e,t,r){var n=r(41),i=r(22);e.exports=Object.keys||function(e){return n(e,i)}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,r){var n=r(3);e.exports=function(e){if(!n(e))throw TypeError(e+" is not an object!");return e}},function(e,t,r){var n=r(1),i=r(30),o=r(2),s=r(10),a=r(44),u=function(e,t,r){var c,l,f,h,p=e&u.F,d=e&u.G,v=e&u.S,y=e&u.P,g=e&u.B,m=d?n:v?n[t]||(n[t]={}):(n[t]||{}).prototype,x=d?i:i[t]||(i[t]={}),w=x.prototype||(x.prototype={});for(c in d&&(r=t),r)f=((l=!p&&m&&void 0!==m[c])?m:r)[c],h=g&&l?a(f,n):y&&"function"==typeof f?a(Function.call,f):f,m&&s(m,c,f,e&u.U),x[c]!=f&&o(x,c,h),y&&w[c]!=f&&(w[c]=f)};n.core=i,u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,e.exports=u},,function(e,t,r){ /*! Browser bundle of nunjucks 2.5.2 (slim, only works with precompiled templates) */ var n;n=function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={exports:{},id:n,loaded:!1};return e[n].call(i.exports,i,i.exports,r),i.loaded=!0,i.exports}return r.m=e,r.c=t,r.p="",r(0)}([function(e,t,r){"use strict";var n,i=r(1),o=r(2),s=r(11),a=r(3),u=r(3);e.exports={},e.exports.Environment=o.Environment,e.exports.Template=o.Template,e.exports.Loader=s,e.exports.FileSystemLoader=a.FileSystemLoader,e.exports.PrecompiledLoader=a.PrecompiledLoader,e.exports.WebLoader=a.WebLoader,e.exports.compiler=r(3),e.exports.parser=r(3),e.exports.lexer=r(3),e.exports.runtime=r(8),e.exports.lib=i,e.exports.nodes=r(3),e.exports.installJinjaCompat=r(12),e.exports.configure=function(e,t){var r;return t=t||{},i.isObject(e)&&(t=e,e=null),a.FileSystemLoader?r=new a.FileSystemLoader(e,{watch:t.watch,noCache:t.noCache}):a.WebLoader&&(r=new a.WebLoader(e,{useCache:t.web&&t.web.useCache,async:t.web&&t.web.async})),n=new o.Environment(r,t),t&&t.express&&n.express(t.express),n},e.exports.compile=function(t,r,i,o){return n||e.exports.configure(),new e.exports.Template(t,r,i,o)},e.exports.render=function(t,r,i){return n||e.exports.configure(),n.render(t,r,i)},e.exports.renderString=function(t,r,i){return n||e.exports.configure(),n.renderString(t,r,i)},u&&(e.exports.precompile=u.precompile,e.exports.precompileString=u.precompileString)},function(e,t){"use strict";var r=Array.prototype,n=Object.prototype,i={"&":"&amp;",'"':"&quot;","'":"&#39;","<":"&lt;",">":"&gt;"},o=/[&"'<>]/g,s=function(e){return i[e]};(t=e.exports={}).prettifyError=function(e,r,n){if(n.Update||(n=new t.TemplateError(n)),n.Update(e),!r){var i=n;(n=new Error(i.message)).name=i.name}return n},t.TemplateError=function(e,t,r){var n=this;if(e instanceof Error){n=e,e=e.name+": "+e.message;try{n.name=""}catch(e){n=this}}else Error.captureStackTrace&&Error.captureStackTrace(n);return n.name="Template render error",n.message=e,n.lineno=t,n.colno=r,n.firstUpdate=!0,n.Update=function(e){var t="("+(e||"unknown path")+")";return this.firstUpdate&&(this.lineno&&this.colno?t+=" [Line "+this.lineno+", Column "+this.colno+"]":this.lineno&&(t+=" [Line "+this.lineno+"]")),t+="\n ",this.firstUpdate&&(t+=" "),this.message=t+(this.message||""),this.firstUpdate=!1,this},n},t.TemplateError.prototype=Error.prototype,t.escape=function(e){return e.replace(o,s)},t.isFunction=function(e){return"[object Function]"===n.toString.call(e)},t.isArray=Array.isArray||function(e){return"[object Array]"===n.toString.call(e)},t.isString=function(e){return"[object String]"===n.toString.call(e)},t.isObject=function(e){return"[object Object]"===n.toString.call(e)},t.groupBy=function(e,r){for(var n={},i=t.isFunction(r)?r:function(e){return e[r]},o=0;o<e.length;o++){var s=e[o],a=i(s,o);(n[a]||(n[a]=[])).push(s)}return n},t.toArray=function(e){return Array.prototype.slice.call(e)},t.without=function(e){var r=[];if(!e)return r;for(var n=-1,i=e.length,o=t.toArray(arguments).slice(1);++n<i;)-1===t.indexOf(o,e[n])&&r.push(e[n]);return r},t.extend=function(e,t){for(var r in t)e[r]=t[r];return e},t.repeat=function(e,t){for(var r="",n=0;n<t;n++)r+=e;return r},t.each=function(e,t,n){if(null!=e)if(r.each&&e.each===r.each)e.forEach(t,n);else if(e.length===+e.length)for(var i=0,o=e.length;i<o;i++)t.call(n,e[i],i,e)},t.map=function(e,t){var n=[];if(null==e)return n;if(r.map&&e.map===r.map)return e.map(t);for(var i=0;i<e.length;i++)n[n.length]=t(e[i],i);return e.length===+e.length&&(n.length=e.length),n},t.asyncIter=function(e,t,r){var n=-1;!function i(){++n<e.length?t(e[n],n,i,r):r()}()},t.asyncFor=function(e,r,n){var i=t.keys(e),o=i.length,s=-1;!function t(){var a=i[++s];s<o?r(a,e[a],s,o,t):n()}()},t.indexOf=Array.prototype.indexOf?function(e,t,r){return Array.prototype.indexOf.call(e,t,r)}:function(e,t,r){var n=this.length>>>0;for(r=+r||0,Math.abs(r)===1/0&&(r=0),r<0&&(r+=n)<0&&(r=0);r<n;r++)if(e[r]===t)return r;return-1},Array.prototype.map||(Array.prototype.map=function(){throw new Error("map is unimplemented for this js engine")}),t.keys=function(e){if(Object.prototype.keys)return e.keys();var t=[];for(var r in e)e.hasOwnProperty(r)&&t.push(r);return t},t.inOperator=function(e,r){if(t.isArray(r))return-1!==t.indexOf(r,e);if(t.isObject(r))return e in r;if(t.isString(r))return-1!==r.indexOf(e);throw new Error('Cannot use "in" operator to search for "'+e+'" in unexpected types.')}},function(e,t,r){"use strict";var n,i=r(3),o=r(4),s=r(1),a=r(6),u=r(3),c=r(7),l=r(3),f=r(8),h=r(9),p=f.Frame;function d(e,t,r){o(function(){e(t,r)})}l.PrecompiledLoader=r(10);var v=a.extend({init:function(e,t){for(var r in t=this.opts=t||{},this.opts.dev=!!t.dev,this.opts.autoescape=null==t.autoescape||t.autoescape,this.opts.throwOnUndefined=!!t.throwOnUndefined,this.opts.trimBlocks=!!t.trimBlocks,this.opts.lstripBlocks=!!t.lstripBlocks,this.loaders=[],e?this.loaders=s.isArray(e)?e:[e]:l.FileSystemLoader?this.loaders=[new l.FileSystemLoader("views")]:l.WebLoader&&(this.loaders=[new l.WebLoader("/views")]),window.nunjucksPrecompiled&&this.loaders.unshift(new l.PrecompiledLoader(window.nunjucksPrecompiled)),this.initCache(),this.globals=h(),this.filters={},this.asyncFilters=[],this.extensions={},this.extensionsList=[],c)this.addFilter(r,c[r])},initCache:function(){s.each(this.loaders,function(e){e.cache={},"function"==typeof e.on&&e.on("update",function(t){e.cache[t]=null})})},addExtension:function(e,t){return t._name=e,this.extensions[e]=t,this.extensionsList.push(t),this},removeExtension:function(e){var t=this.getExtension(e);t&&(this.extensionsList=s.without(this.extensionsList,t),delete this.extensions[e])},getExtension:function(e){return this.extensions[e]},hasExtension:function(e){return!!this.extensions[e]},addGlobal:function(e,t){return this.globals[e]=t,this},getGlobal:function(e){if(void 0===this.globals[e])throw new Error("global not found: "+e);return this.globals[e]},addFilter:function(e,t,r){var n=t;return r&&this.asyncFilters.push(e),this.filters[e]=n,this},getFilter:function(e){if(!this.filters[e])throw new Error("filter not found: "+e);return this.filters[e]},resolveTemplate:function(e,t,r){return!(!e.isRelative||!t)&&e.isRelative(r)&&e.resolve?e.resolve(t,r):r},getTemplate:function(e,t,r,i,o){var a=this,u=null;if(e&&e.raw&&(e=e.raw),s.isFunction(r)&&(o=r,r=null,t=t||!1),s.isFunction(t)&&(o=t,t=!1),e instanceof n)u=e;else{if("string"!=typeof e)throw new Error("template names must be a string: "+e);for(var c=0;c<this.loaders.length;c++){var l=this.resolveTemplate(this.loaders[c],r,e);if(u=this.loaders[c].cache[l])break}}if(!u){var f,h=this;return s.asyncIter(this.loaders,function(t,n,i,o){function s(e,r){e?o(e):r?(r.loader=t,o(null,r)):i()}e=a.resolveTemplate(t,r,e),t.async?t.getSource(e,s):s(null,t.getSource(e))},function(r,s){if(s||r||i||(r=new Error("template not found: "+e)),r){if(!o)throw r;o(r)}else{var a;s?(a=new n(s.src,h,s.path,t),s.noCache||(s.loader.cache[e]=a)):a=new n("",h,"",t),o?o(null,a):f=a}}),f}if(t&&u.compile(),!o)return u;o(null,u)},express:function(e){var t=this;function r(e,t){if(this.name=e,this.path=e,this.defaultEngine=t.defaultEngine,this.ext=i.extname(e),!this.ext&&!this.defaultEngine)throw new Error("No default engine was specified and no extension was provided.");this.ext||(this.name+=this.ext=("."!==this.defaultEngine[0]?".":"")+this.defaultEngine)}return r.prototype.render=function(e,r){t.render(this.name,e,r)},e.set("view",r),e.set("nunjucksEnv",this),this},render:function(e,t,r){s.isFunction(t)&&(r=t,t=null);var n=null;return this.getTemplate(e,function(e,i){if(e&&r)d(r,e);else{if(e)throw e;n=i.render(t,r)}}),n},renderString:function(e,t,r,i){return s.isFunction(r)&&(i=r,r={}),new n(e,this,(r=r||{}).path).render(t,i)}}),y=a.extend({init:function(e,t,r){for(var n in this.env=r||new v,this.ctx={},e)e.hasOwnProperty(n)&&(this.ctx[n]=e[n]);for(var i in this.blocks={},this.exported=[],t)this.addBlock(i,t[i])},lookup:function(e){return e in this.env.globals&&!(e in this.ctx)?this.env.globals[e]:this.ctx[e]},setVariable:function(e,t){this.ctx[e]=t},getVariables:function(){return this.ctx},addBlock:function(e,t){return this.blocks[e]=this.blocks[e]||[],this.blocks[e].push(t),this},getBlock:function(e){if(!this.blocks[e])throw new Error('unknown block "'+e+'"');return this.blocks[e][0]},getSuper:function(e,t,r,n,i,o){var a=s.indexOf(this.blocks[t]||[],r),u=this.blocks[t][a+1];if(-1===a||!u)throw new Error('no super block available for "'+t+'"');u(e,this,n,i,o)},addExport:function(e){this.exported.push(e)},getExported:function(){for(var e={},t=0;t<this.exported.length;t++){var r=this.exported[t];e[r]=this.ctx[r]}return e}});n=a.extend({init:function(e,t,r,n){if(this.env=t||new v,s.isObject(e))switch(e.type){case"code":this.tmplProps=e.obj;break;case"string":this.tmplStr=e.obj}else{if(!s.isString(e))throw new Error("src must be a string or an object describing the source");this.tmplStr=e}if(this.path=r,n){try{this._compile()}catch(e){throw s.prettifyError(this.path,this.env.opts.dev,e)}}else this.compiled=!1},render:function(e,t,r){"function"==typeof e?(r=e,e={}):"function"==typeof t&&(r=t,t=null);var n=!0;t&&(n=!1);var i=this;try{i.compile()}catch(e){var o=s.prettifyError(this.path,this.env.opts.dev,e);if(r)return d(r,o);throw o}var a=new y(e||{},i.blocks,i.env),u=t?t.push(!0):new p;u.topLevel=!0;var c=null;return i.rootRenderFunc(i.env,a,u||new p,f,function(e,t){if(e&&(e=s.prettifyError(i.path,i.env.opts.dev,e)),r)n?d(r,e,t):r(e,t);else{if(e)throw e;c=t}}),c},getExported:function(e,t,r){"function"==typeof e&&(r=e,e={}),"function"==typeof t&&(r=t,t=null);try{this.compile()}catch(e){if(r)return r(e);throw e}var n=t?t.push():new p;n.topLevel=!0;var i=new y(e||{},this.blocks,this.env);this.rootRenderFunc(this.env,i,n,f,function(e){e?r(e,null):r(null,i.getExported())})},compile:function(){this.compiled||this._compile()},_compile:function(){var e;if(this.tmplProps)e=this.tmplProps;else{var t=u.compile(this.tmplStr,this.env.asyncFilters,this.env.extensionsList,this.path,this.env.opts);e=new Function(t)()}this.blocks=this._getBlocks(e),this.rootRenderFunc=e.root,this.compiled=!0},_getBlocks:function(e){var t={};for(var r in e)"b_"===r.slice(0,2)&&(t[r.slice(2)]=e[r]);return t}}),e.exports={Environment:v,Template:n}},function(e,t){},function(e,t,r){"use strict";var n=r(5),i=[],o=[],s=n.makeRequestCallFromTimer(function(){if(o.length)throw o.shift()});function a(e){var t;(t=i.length?i.pop():new u).task=e,n(t)}function u(){this.task=null}e.exports=a,u.prototype.call=function(){try{this.task.call()}catch(e){a.onerror?a.onerror(e):(o.push(e),s())}finally{this.task=null,i[i.length]=this}}},function(e,t){(function(t){"use strict";function r(e){i.length||(n(),!0),i[i.length]=e}e.exports=r;var n,i=[],o=0,s=1024;function a(){for(;o<i.length;){var e=o;if(o+=1,i[e].call(),o>s){for(var t=0,r=i.length-o;t<r;t++)i[t]=i[t+o];i.length-=o,o=0}}i.length=0,o=0,!1}var u,c,l,f=t.MutationObserver||t.WebKitMutationObserver;function h(e){return function(){var t=setTimeout(n,0),r=setInterval(n,50);function n(){clearTimeout(t),clearInterval(r),e()}}}"function"==typeof f?(u=1,c=new f(a),l=document.createTextNode(""),c.observe(l,{characterData:!0}),n=function(){u=-u,l.data=u}):n=h(a),r.requestFlush=n,r.makeRequestCallFromTimer=h}).call(t,function(){return this}())},function(e,t){"use strict";e.exports=function e(t,r,n){var i=function(){};i.prototype=t.prototype;var o=new i,s=/xyz/.test(function(){xyz})?/\bparent\b/:/.*/;for(var a in n=n||{}){var u=n[a],c=o[a];"function"==typeof c&&"function"==typeof u&&s.test(u)?o[a]=function(e,t){return function(){var r=this.parent;this.parent=t;var n=e.apply(this,arguments);return this.parent=r,n}}(u,c):o[a]=u}o.typename=r;var l=function(){o.init&&o.init.apply(this,arguments)};return(l.prototype=o).constructor=l,l.extend=function(t,r){return"object"==typeof t&&(r=t,t="anonymous"),e(l,t,r)},l}(Object,"Object",{})},function(e,t,r){"use strict";var n=r(1),i=r(8);function o(e,t){return null===e||void 0===e||!1===e?t:e}var s={abs:function(e){return Math.abs(e)},batch:function(e,t,r){var n,i=[],o=[];for(n=0;n<e.length;n++)n%t==0&&o.length&&(i.push(o),o=[]),o.push(e[n]);if(o.length){if(r)for(n=o.length;n<t;n++)o.push(r);i.push(o)}return i},capitalize:function(e){var t=(e=o(e,"")).toLowerCase();return i.copySafeness(e,t.charAt(0).toUpperCase()+t.slice(1))},center:function(e,t){if(e=o(e,""),t=t||80,e.length>=t)return e;var r=t-e.length,s=n.repeat(" ",r/2-r%2),a=n.repeat(" ",r/2);return i.copySafeness(e,s+e+a)},default:function(e,t,r){return r?e||t:void 0!==e?e:t},dictsort:function(e,t,r){if(!n.isObject(e))throw new n.TemplateError("dictsort filter: val must be an object");var i,o=[];for(var s in e)o.push([s,e[s]]);if(void 0===r||"key"===r)i=0;else{if("value"!==r)throw new n.TemplateError("dictsort filter: You can only sort by either key or value");i=1}return o.sort(function(e,r){var o=e[i],s=r[i];return t||(n.isString(o)&&(o=o.toUpperCase()),n.isString(s)&&(s=s.toUpperCase())),o>s?1:o===s?0:-1}),o},dump:function(e){return JSON.stringify(e)},escape:function(e){return e instanceof i.SafeString?e:(e=null===e||void 0===e?"":e,i.markSafe(n.escape(e.toString())))},safe:function(e){return e instanceof i.SafeString?e:(e=null===e||void 0===e?"":e,i.markSafe(e.toString()))},first:function(e){return e[0]},groupby:function(e,t){return n.groupBy(e,t)},indent:function(e,t,r){if(""===(e=o(e,"")))return"";t=t||4;for(var s="",a=e.split("\n"),u=n.repeat(" ",t),c=0;c<a.length;c++)s+=0!==c||r?u+a[c]+"\n":a[c]+"\n";return i.copySafeness(e,s)},join:function(e,t,r){return t=t||"",r&&(e=n.map(e,function(e){return e[r]})),e.join(t)},last:function(e){return e[e.length-1]},length:function(e){var t=o(e,"");return void 0!==t?"function"==typeof Map&&t instanceof Map||"function"==typeof Set&&t instanceof Set?t.size:!n.isObject(t)||t instanceof i.SafeString?t.length:Object.keys(t).length:0},list:function(e){if(n.isString(e))return e.split("");if(n.isObject(e)){var t=[];if(Object.keys)t=Object.keys(e);else for(var r in e)t.push(r);return n.map(t,function(t){return{key:t,value:e[t]}})}if(n.isArray(e))return e;throw new n.TemplateError("list filter: type not iterable")},lower:function(e){return(e=o(e,"")).toLowerCase()},random:function(e){return e[Math.floor(Math.random()*e.length)]},rejectattr:function(e,t){return e.filter(function(e){return!e[t]})},selectattr:function(e,t){return e.filter(function(e){return!!e[t]})},replace:function(e,t,r,n){var o=e;if(t instanceof RegExp)return e.replace(t,r);void 0===n&&(n=-1);var s="";if("number"==typeof t)t+="";else if("string"!=typeof t)return e;if("number"==typeof e&&(e+=""),"string"!=typeof e&&!(e instanceof i.SafeString))return e;if(""===t)return s=r+e.split("").join(r)+r,i.copySafeness(e,s);var a=e.indexOf(t);if(0===n||-1===a)return e;for(var u=0,c=0;a>-1&&(-1===n||c<n);)s+=e.substring(u,a)+r,u=a+t.length,c++,a=e.indexOf(t,u);return u<e.length&&(s+=e.substring(u)),i.copySafeness(o,s)},reverse:function(e){var t;return(t=n.isString(e)?s.list(e):n.map(e,function(e){return e})).reverse(),n.isString(e)?i.copySafeness(e,t.join("")):t},round:function(e,t,r){t=t||0;var n=Math.pow(10,t);return("ceil"===r?Math.ceil:"floor"===r?Math.floor:Math.round)(e*n)/n},slice:function(e,t,r){for(var n=Math.floor(e.length/t),i=e.length%t,o=0,s=[],a=0;a<t;a++){var u=o+a*n;a<i&&o++;var c=o+(a+1)*n,l=e.slice(u,c);r&&a>=i&&l.push(r),s.push(l)}return s},sum:function(e,t,r){var i=0;"number"==typeof r&&(i+=r),t&&(e=n.map(e,function(e){return e[t]}));for(var o=0;o<e.length;o++)i+=e[o];return i},sort:i.makeMacro(["value","reverse","case_sensitive","attribute"],[],function(e,t,r,i){return(e=n.map(e,function(e){return e})).sort(function(e,o){var s,a;return i?(s=e[i],a=o[i]):(s=e,a=o),!r&&n.isString(s)&&n.isString(a)&&(s=s.toLowerCase(),a=a.toLowerCase()),s<a?t?1:-1:s>a?t?-1:1:0}),e}),string:function(e){return i.copySafeness(e,e)},striptags:function(e,t){e=o(e,""),t=t||!1;var r=s.trim(e.replace(/<\/?([a-z][a-z0-9]*)\b[^>]*>|<!--[\s\S]*?-->/gi,"")),n="";return n=t?r.replace(/^ +| +$/gm,"").replace(/ +/g," ").replace(/(\r\n)/g,"\n").replace(/\n\n\n+/g,"\n\n"):r.replace(/\s+/gi," "),i.copySafeness(e,n)},title:function(e){for(var t=(e=o(e,"")).split(" "),r=0;r<t.length;r++)t[r]=s.capitalize(t[r]);return i.copySafeness(e,t.join(" "))},trim:function(e){return i.copySafeness(e,e.replace(/^\s*|\s*$/g,""))},truncate:function(e,t,r,n){var s=e;if(e=o(e,""),t=t||255,e.length<=t)return e;if(r)e=e.substring(0,t);else{var a=e.lastIndexOf(" ",t);-1===a&&(a=t),e=e.substring(0,a)}return e+=void 0!==n&&null!==n?n:"...",i.copySafeness(s,e)},upper:function(e){return(e=o(e,"")).toUpperCase()},urlencode:function(e){var t,r=encodeURIComponent;if(n.isString(e))return r(e);if(n.isArray(e))t=e.map(function(e){return r(e[0])+"="+r(e[1])});else for(var i in t=[],e)e.hasOwnProperty(i)&&t.push(r(i)+"="+r(e[i]));return t.join("&")},urlize:function(e,t,r){isNaN(t)&&(t=1/0);var n=!0===r?' rel="nofollow"':"",i=/^(?:\(|<|&lt;)?(.*?)(?:\.|,|\)|\n|&gt;)?$/,o=/^[\w.!#$%&'*+\-\/=?\^`{|}~]+@[a-z\d\-]+(\.[a-z\d\-]+)+$/i,s=/^https?:\/\/.*$/,a=/^www\./,u=/\.(?:org|net|com)(?:\:|\/|$)/;return e.split(/(\s+)/).filter(function(e){return e&&e.length}).map(function(e){var r=e.match(i),c=r&&r[1]||e;return s.test(c)?'<a href="'+c+'"'+n+">"+c.substr(0,t)+"</a>":a.test(c)?'<a href="http://'+c+'"'+n+">"+c.substr(0,t)+"</a>":o.test(c)?'<a href="mailto:'+c+'">'+c+"</a>":u.test(c)?'<a href="http://'+c+'"'+n+">"+c.substr(0,t)+"</a>":e}).join("")},wordcount:function(e){var t=(e=o(e,""))?e.match(/\w+/g):null;return t?t.length:null},float:function(e,t){var r=parseFloat(e);return isNaN(r)?t:r},int:function(e,t){var r=parseInt(e,10);return isNaN(r)?t:r}};s.d=s.default,s.e=s.escape,e.exports=s},function(e,t,r){"use strict";var n=r(1),i=r(6).extend({init:function(e,t){this.variables={},this.parent=e,this.topLevel=!1,this.isolateWrites=t},set:function(e,t,r){var n=e.split("."),i=this.variables,o=this;if(r&&(o=this.resolve(n[0],!0)))o.set(e,t);else{for(var s=0;s<n.length-1;s++){var a=n[s];i[a]||(i[a]={}),i=i[a]}i[n[n.length-1]]=t}},get:function(e){var t=this.variables[e];return void 0!==t&&null!==t?t:null},lookup:function(e){var t=this.parent,r=this.variables[e];return void 0!==r&&null!==r?r:t&&t.lookup(e)},resolve:function(e,t){var r=t&&this.isolateWrites?void 0:this.parent,n=this.variables[e];return void 0!==n&&null!==n?this:r&&r.resolve(e)},push:function(e){return new i(this,e)},pop:function(){return this.parent}});function o(e){var t=e.length;if(0===t)return 0;var r=e[t-1];return r&&r.hasOwnProperty("__keywords")?t-1:t}function s(e){if("string"!=typeof e)return e;this.val=e,this.length=e.length}s.prototype=Object.create(String.prototype,{length:{writable:!0,configurable:!0,value:0}}),s.prototype.valueOf=function(){return this.val},s.prototype.toString=function(){return this.val},e.exports={Frame:i,makeMacro:function(e,t,r){return function(){var n,i,s=o(arguments),a=function(e){var t=e.length;if(t){var r=e[t-1];if(r&&r.hasOwnProperty("__keywords"))return r}return{}}(arguments);if(s>e.length){n=Array.prototype.slice.call(arguments,0,e.length);var u=Array.prototype.slice.call(arguments,n.length,s);for(i=0;i<u.length;i++)i<t.length&&(a[t[i]]=u[i]);n.push(a)}else if(s<e.length){for(n=Array.prototype.slice.call(arguments,0,s),i=s;i<e.length;i++){var c=e[i];n.push(a[c]),delete a[c]}n.push(a)}else n=arguments;return r.apply(this,n)}},makeKeywordArgs:function(e){return e.__keywords=!0,e},numArgs:o,suppressValue:function(e,t){return e=void 0!==e&&null!==e?e:"",!t||e instanceof s||(e=n.escape(e.toString())),e},ensureDefined:function(e,t,r){if(null===e||void 0===e)throw new n.TemplateError("attempted to output null or undefined value",t+1,r+1);return e},memberLookup:function(e,t){return"function"==typeof(e=e||{})[t]?function(){return e[t].apply(e,arguments)}:e[t]},contextOrFrameLookup:function(e,t,r){var n=t.lookup(r);return void 0!==n&&null!==n?n:e.lookup(r)},callWrap:function(e,t,r,n){if(!e)throw new Error("Unable to call `"+t+"`, which is undefined or falsey");if("function"!=typeof e)throw new Error("Unable to call `"+t+"`, which is not a function");return e.apply(r,n)},handleError:function(e,t,r){return e.lineno?e:new n.TemplateError(e,t,r)},isArray:n.isArray,keys:n.keys,SafeString:s,copySafeness:function(e,t){return e instanceof s?new s(t):t.toString()},markSafe:function(e){var t=typeof e;return"string"===t?new s(e):"function"!==t?e:function(){var t=e.apply(this,arguments);return"string"==typeof t?new s(t):t}},asyncEach:function(e,t,r,i){if(n.isArray(e)){var o=e.length;n.asyncIter(e,function(e,n,i){switch(t){case 1:r(e,n,o,i);break;case 2:r(e[0],e[1],n,o,i);break;case 3:r(e[0],e[1],e[2],n,o,i);break;default:e.push(n,i),r.apply(this,e)}},i)}else n.asyncFor(e,function(e,t,n,i,o){r(e,t,n,i,o)},i)},asyncAll:function(e,t,r,i){var o,s,a,u=0;function c(e,t){u++,a[e]=t,u===o&&i(null,a.join(""))}if(n.isArray(e))if(o=e.length,a=new Array(o),0===o)i(null,"");else for(s=0;s<e.length;s++){var l=e[s];switch(t){case 1:r(l,s,o,c);break;case 2:r(l[0],l[1],s,o,c);break;case 3:r(l[0],l[1],l[2],s,o,c);break;default:l.push(s,c),r.apply(this,l)}}else{var f=n.keys(e);if(o=f.length,a=new Array(o),0===o)i(null,"");else for(s=0;s<f.length;s++){var h=f[s];r(h,e[h],s,o,c)}}},inOperator:n.inOperator}},function(e,t){"use strict";e.exports=function(){return{range:function(e,t,r){void 0===t?(t=e,e=0,r=1):r||(r=1);var n,i=[];if(r>0)for(n=e;n<t;n+=r)i.push(n);else for(n=e;n>t;n+=r)i.push(n);return i},cycler:function(){return e=Array.prototype.slice.call(arguments),t=-1,{current:null,reset:function(){t=-1,this.current=null},next:function(){return++t>=e.length&&(t=0),this.current=e[t],this.current}};var e,t},joiner:function(e){return function(e){e=e||",";var t=!0;return function(){var r=t?"":e;return t=!1,r}}(e)}}}},function(e,t,r){"use strict";var n=r(11).extend({init:function(e){this.precompiled=e||{}},getSource:function(e){return this.precompiled[e]?{src:{type:"code",obj:this.precompiled[e]},path:e}:null}});e.exports=n},function(e,t,r){"use strict";var n=r(3),i=r(6),o=r(1),s=i.extend({on:function(e,t){this.listeners=this.listeners||{},this.listeners[e]=this.listeners[e]||[],this.listeners[e].push(t)},emit:function(e){var t=Array.prototype.slice.call(arguments,1);this.listeners&&this.listeners[e]&&o.each(this.listeners[e],function(e){e.apply(null,t)})},resolve:function(e,t){return n.resolve(n.dirname(e),t)},isRelative:function(e){return 0===e.indexOf("./")||0===e.indexOf("../")}});e.exports=s},function(e,t){e.exports=function(){"use strict";var e=this.runtime,t=this.lib,r=e.contextOrFrameLookup;e.contextOrFrameLookup=function(e,t,n){var i=r.apply(this,arguments);if(void 0===i)switch(n){case"True":return!0;case"False":return!1;case"None":return null}return i};var n=e.memberLookup,i={pop:function(e){if(void 0===e)return this.pop();if(e>=this.length||e<0)throw new Error("KeyError");return this.splice(e,1)},remove:function(e){for(var t=0;t<this.length;t++)if(this[t]===e)return this.splice(t,1);throw new Error("ValueError")},count:function(e){for(var t=0,r=0;r<this.length;r++)this[r]===e&&t++;return t},index:function(e){var t;if(-1===(t=this.indexOf(e)))throw new Error("ValueError");return t},find:function(e){return this.indexOf(e)},insert:function(e,t){return this.splice(e,0,t)}},o={items:function(){var e=[];for(var t in this)e.push([t,this[t]]);return e},values:function(){var e=[];for(var t in this)e.push(this[t]);return e},keys:function(){var e=[];for(var t in this)e.push(t);return e},get:function(e,t){var r=this[e];return void 0===r&&(r=t),r},has_key:function(e){return this.hasOwnProperty(e)},pop:function(e,t){var r=this[e];if(void 0===r&&void 0!==t)r=t;else{if(void 0===r)throw new Error("KeyError");delete this[e]}return r},popitem:function(){for(var e in this){var t=this[e];return delete this[e],[e,t]}throw new Error("KeyError")},setdefault:function(e,t){return e in this?this[e]:(void 0===t&&(t=null),this[e]=t)},update:function(e){for(var t in e)this[t]=e[t];return null}};o.iteritems=o.items,o.itervalues=o.values,o.iterkeys=o.keys,e.memberLookup=function(e,r,s){return e=e||{},t.isArray(e)&&i.hasOwnProperty(r)?function(){return i[r].apply(e,arguments)}:t.isObject(e)&&o.hasOwnProperty(r)?function(){return o[r].apply(e,arguments)}:n.apply(this,arguments)}}}])},e.exports=n()},,function(e,t,r){var n=r(24);e.exports=function(e){return Object(n(e))}},function(e,t){e.exports={}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t,r){var n=r(28)("keys"),i=r(9);e.exports=function(e){return n[e]||(n[e]=i(e))}},function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},function(e,t){var r={}.toString;e.exports=function(e){return r.call(e).slice(8,-1)}},function(e,t){e.exports=!1},function(e,t,r){var n=r(4).f,i=r(7),o=r(0)("toStringTag");e.exports=function(e,t,r){e&&!i(e=r?e:e.prototype,o)&&n(e,o,{configurable:!0,value:t})}},function(e,t,r){var n=r(1),i=n["__core-js_shared__"]||(n["__core-js_shared__"]={});e.exports=function(e){return i[e]||(i[e]={})}},function(e,t,r){var n=r(3);e.exports=function(e,t){if(!n(e))return e;var r,i;if(t&&"function"==typeof(r=e.toString)&&!n(i=r.call(e)))return i;if("function"==typeof(r=e.valueOf)&&!n(i=r.call(e)))return i;if(!t&&"function"==typeof(r=e.toString)&&!n(i=r.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},function(e,t){var r=e.exports={version:"2.5.4"};"number"==typeof __e&&(__e=r)},function(e,t,r){ /*!*************************************************** * mark.js v8.11.1 * https://markjs.io/ * Copyright (c) 2014–2018, Julian Kühnel * Released under the MIT license https://git.io/vwTVl *****************************************************/ e.exports=function(){"use strict";var e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},r=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},i=function(){function e(r){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:5e3;t(this,e),this.ctx=r,this.iframes=n,this.exclude=i,this.iframesTimeout=o}return r(e,[{key:"getContexts",value:function(){var e=[];return(void 0!==this.ctx&&this.ctx?NodeList.prototype.isPrototypeOf(this.ctx)?Array.prototype.slice.call(this.ctx):Array.isArray(this.ctx)?this.ctx:"string"==typeof this.ctx?Array.prototype.slice.call(document.querySelectorAll(this.ctx)):[this.ctx]:[]).forEach(function(t){var r=e.filter(function(e){return e.contains(t)}).length>0;-1!==e.indexOf(t)||r||e.push(t)}),e}},{key:"getIframeContents",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},n=void 0;try{var i=e.contentWindow;if(n=i.document,!i||!n)throw new Error("iframe inaccessible")}catch(e){r()}n&&t(n)}},{key:"isIframeBlank",value:function(e){var t="about:blank",r=e.getAttribute("src").trim(),n=e.contentWindow.location.href;return n===t&&r!==t&&r}},{key:"observeIframeLoad",value:function(e,t,r){var n=this,i=!1,o=null,s=function s(){if(!i){i=!0,clearTimeout(o);try{n.isIframeBlank(e)||(e.removeEventListener("load",s),n.getIframeContents(e,t,r))}catch(e){r()}}};e.addEventListener("load",s),o=setTimeout(s,this.iframesTimeout)}},{key:"onIframeReady",value:function(e,t,r){try{"complete"===e.contentWindow.document.readyState?this.isIframeBlank(e)?this.observeIframeLoad(e,t,r):this.getIframeContents(e,t,r):this.observeIframeLoad(e,t,r)}catch(e){r()}}},{key:"waitForIframes",value:function(e,t){var r=this,n=0;this.forEachIframe(e,function(){return!0},function(e){n++,r.waitForIframes(e.querySelector("html"),function(){--n||t()})},function(e){e||t()})}},{key:"forEachIframe",value:function(t,r,n){var i=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){},s=t.querySelectorAll("iframe"),a=s.length,u=0;s=Array.prototype.slice.call(s);var c=function(){--a<=0&&o(u)};a||c(),s.forEach(function(t){e.matches(t,i.exclude)?c():i.onIframeReady(t,function(e){r(t)&&(u++,n(e)),c()},c)})}},{key:"createIterator",value:function(e,t,r){return document.createNodeIterator(e,t,r,!1)}},{key:"createInstanceOnIframe",value:function(t){return new e(t.querySelector("html"),this.iframes)}},{key:"compareNodeIframe",value:function(e,t,r){var n=e.compareDocumentPosition(r),i=Node.DOCUMENT_POSITION_PRECEDING;if(n&i){if(null===t)return!0;var o=t.compareDocumentPosition(r),s=Node.DOCUMENT_POSITION_FOLLOWING;if(o&s)return!0}return!1}},{key:"getIteratorNode",value:function(e){var t=e.previousNode(),r=void 0;return r=null===t?e.nextNode():e.nextNode()&&e.nextNode(),{prevNode:t,node:r}}},{key:"checkIframeFilter",value:function(e,t,r,n){var i=!1,o=!1;return n.forEach(function(e,t){e.val===r&&(i=t,o=e.handled)}),this.compareNodeIframe(e,t,r)?(!1!==i||o?!1===i||o||(n[i].handled=!0):n.push({val:r,handled:!0}),!0):(!1===i&&n.push({val:r,handled:!1}),!1)}},{key:"handleOpenIframes",value:function(e,t,r,n){var i=this;e.forEach(function(e){e.handled||i.getIframeContents(e.val,function(e){i.createInstanceOnIframe(e).forEachNode(t,r,n)})})}},{key:"iterateThroughNodes",value:function(e,t,r,n,i){for(var o=this,s=this.createIterator(t,e,n),a=[],u=[],c=void 0,l=void 0;void 0,f=o.getIteratorNode(s),l=f.prevNode,c=f.node;)this.iframes&&this.forEachIframe(t,function(e){return o.checkIframeFilter(c,l,e,a)},function(t){o.createInstanceOnIframe(t).forEachNode(e,function(e){return u.push(e)},n)}),u.push(c);var f;u.forEach(function(e){r(e)}),this.iframes&&this.handleOpenIframes(a,e,r,n),i()}},{key:"forEachNode",value:function(e,t,r){var n=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){},o=this.getContexts(),s=o.length;s||i(),o.forEach(function(o){var a=function(){n.iterateThroughNodes(e,o,t,r,function(){--s<=0&&i()})};n.iframes?n.waitForIframes(o,a):a()})}}],[{key:"matches",value:function(e,t){var r="string"==typeof t?[t]:t,n=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector;if(n){var i=!1;return r.every(function(t){return!n.call(e,t)||(i=!0,!1)}),i}return!1}}]),e}(),o=function(){function o(e){t(this,o),this.ctx=e,this.ie=!1;var r=window.navigator.userAgent;(r.indexOf("MSIE")>-1||r.indexOf("Trident")>-1)&&(this.ie=!0)}return r(o,[{key:"log",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"debug",n=this.opt.log;this.opt.debug&&"object"===(void 0===n?"undefined":e(n))&&"function"==typeof n[r]&&n[r]("mark.js: "+t)}},{key:"escapeStr",value:function(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}},{key:"createRegExp",value:function(e){return"disabled"!==this.opt.wildcards&&(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)),"disabled"!==this.opt.wildcards&&(e=this.createWildcardsRegExp(e)),e=this.createAccuracyRegExp(e)}},{key:"createSynonymsRegExp",value:function(e){var t=this.opt.synonyms,r=this.opt.caseSensitive?"":"i",n=this.opt.ignoreJoiners||this.opt.ignorePunctuation.length?"\0":"";for(var i in t)if(t.hasOwnProperty(i)){var o=t[i],s="disabled"!==this.opt.wildcards?this.setupWildcardsRegExp(i):this.escapeStr(i),a="disabled"!==this.opt.wildcards?this.setupWildcardsRegExp(o):this.escapeStr(o);""!==s&&""!==a&&(e=e.replace(new RegExp("("+this.escapeStr(s)+"|"+this.escapeStr(a)+")","gm"+r),n+"("+this.processSynomyms(s)+"|"+this.processSynomyms(a)+")"+n))}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(e){return"\\"===e.charAt(0)?"?":""})).replace(/(?:\\)*\*/g,function(e){return"\\"===e.charAt(0)?"*":""})}},{key:"createWildcardsRegExp",value:function(e){var t="withSpaces"===this.opt.wildcards;return e.replace(/\u0001/g,t?"[\\S\\s]?":"\\S?").replace(/\u0002/g,t?"[\\S\\s]*?":"\\S*")}},{key:"setupIgnoreJoinersRegExp",value:function(e){return e.replace(/[^(|)\\]/g,function(e,t,r){var n=r.charAt(t+1);return/[(|)\\]/.test(n)||""===n?e:e+"\0"})}},{key:"createJoinersRegExp",value:function(e){var t=[],r=this.opt.ignorePunctuation;return Array.isArray(r)&&r.length&&t.push(this.escapeStr(r.join(""))),this.opt.ignoreJoiners&&t.push("\\u00ad\\u200b\\u200c\\u200d"),t.length?e.split(/\u0000+/).join("["+t.join("")+"]*"):e}},{key:"createDiacriticsRegExp",value:function(e){var t=this.opt.caseSensitive?"":"i",r=this.opt.caseSensitive?["aàáảãạăằắẳẵặâầấẩẫậäåāą","AÀÁẢÃẠĂẰẮẲẴẶÂẦẤẨẪẬÄÅĀĄ","cçćč","CÇĆČ","dđď","DĐĎ","eèéẻẽẹêềếểễệëěēę","EÈÉẺẼẸÊỀẾỂỄỆËĚĒĘ","iìíỉĩịîïī","IÌÍỈĨỊÎÏĪ","lł","LŁ","nñňń","NÑŇŃ","oòóỏõọôồốổỗộơởỡớờợöøō","OÒÓỎÕỌÔỒỐỔỖỘƠỞỠỚỜỢÖØŌ","rř","RŘ","sšśșş","SŠŚȘŞ","tťțţ","TŤȚŢ","uùúủũụưừứửữựûüůū","UÙÚỦŨỤƯỪỨỬỮỰÛÜŮŪ","yýỳỷỹỵÿ","YÝỲỶỸỴŸ","zžżź","ZŽŻŹ"]:["aàáảãạăằắẳẵặâầấẩẫậäåāąAÀÁẢÃẠĂẰẮẲẴẶÂẦẤẨẪẬÄÅĀĄ","cçćčCÇĆČ","dđďDĐĎ","eèéẻẽẹêềếểễệëěēęEÈÉẺẼẸÊỀẾỂỄỆËĚĒĘ","iìíỉĩịîïīIÌÍỈĨỊÎÏĪ","lłLŁ","nñňńNÑŇŃ","oòóỏõọôồốổỗộơởỡớờợöøōOÒÓỎÕỌÔỒỐỔỖỘƠỞỠỚỜỢÖØŌ","rřRŘ","sšśșşSŠŚȘŞ","tťțţTŤȚŢ","uùúủũụưừứửữựûüůūUÙÚỦŨỤƯỪỨỬỮỰÛÜŮŪ","yýỳỷỹỵÿYÝỲỶỸỴŸ","zžżźZŽŻŹ"],n=[];return e.split("").forEach(function(i){r.every(function(r){if(-1!==r.indexOf(i)){if(n.indexOf(r)>-1)return!1;e=e.replace(new RegExp("["+r+"]","gm"+t),"["+r+"]"),n.push(r)}return!0})}),e}},{key:"createMergedBlanksRegExp",value:function(e){return e.replace(/[\s]+/gim,"[\\s]+")}},{key:"createAccuracyRegExp",value:function(e){var t=this,r=this.opt.accuracy,n="string"==typeof r?r:r.value,i="string"==typeof r?[]:r.limiters,o="";switch(i.forEach(function(e){o+="|"+t.escapeStr(e)}),n){case"partially":default:return"()("+e+")";case"complementary":return"()([^"+(o="\\s"+(o||this.escapeStr("!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~¡¿")))+"]*"+e+"[^"+o+"]*)";case"exactly":return"(^|\\s"+o+")("+e+")(?=$|\\s"+o+")"}}},{key:"getSeparatedKeywords",value:function(e){var t=this,r=[];return e.forEach(function(e){t.opt.separateWordSearch?e.split(" ").forEach(function(e){e.trim()&&-1===r.indexOf(e)&&r.push(e)}):e.trim()&&-1===r.indexOf(e)&&r.push(e)}),{keywords:r.sort(function(e,t){return t.length-e.length}),length:r.length}}},{key:"isNumeric",value:function(e){return Number(parseFloat(e))==e}},{key:"checkRanges",value:function(e){var t=this;if(!Array.isArray(e)||"[object Object]"!==Object.prototype.toString.call(e[0]))return this.log("markRanges() will only accept an array of objects"),this.opt.noMatch(e),[];var r=[],n=0;return e.sort(function(e,t){return e.start-t.start}).forEach(function(e){var i=t.callNoMatchOnInvalidRanges(e,n),o=i.start,s=i.end,a=i.valid;a&&(e.start=o,e.length=s-o,r.push(e),n=s)}),r}},{key:"callNoMatchOnInvalidRanges",value:function(e,t){var r=void 0,n=void 0,i=!1;return e&&void 0!==e.start?(r=parseInt(e.start,10),n=r+parseInt(e.length,10),this.isNumeric(e.start)&&this.isNumeric(e.length)&&n-t>0&&n-r>0?i=!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:r,end:n,valid:i}}},{key:"checkWhitespaceRanges",value:function(e,t,r){var n=void 0,i=!0,o=r.length,s=t-o,a=parseInt(e.start,10)-s;return(n=(a=a>o?o:a)+parseInt(e.length,10))>o&&(n=o,this.log("End range automatically set to the max value of "+o)),a<0||n-a<0||a>o||n>o?(i=!1,this.log("Invalid range: "+JSON.stringify(e)),this.opt.noMatch(e)):""===r.substring(a,n).replace(/\s+/g,"")&&(i=!1,this.log("Skipping whitespace only range: "+JSON.stringify(e)),this.opt.noMatch(e)),{start:a,end:n,valid:i}}},{key:"getTextNodes",value:function(e){var t=this,r="",n=[];this.iterator.forEachNode(NodeFilter.SHOW_TEXT,function(e){n.push({start:r.length,end:(r+=e.textContent).length,node:e})},function(e){return t.matchesExclude(e.parentNode)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT},function(){e({value:r,nodes:n})})}},{key:"matchesExclude",value:function(e){return i.matches(e,this.opt.exclude.concat(["script","style","title","head","html"]))}},{key:"wrapRangeInTextNode",value:function(e,t,r){var n=this.opt.element?this.opt.element:"mark",i=e.splitText(t),o=i.splitText(r-t),s=document.createElement(n);return s.setAttribute("data-markjs","true"),this.opt.className&&s.setAttribute("class",this.opt.className),s.textContent=i.textContent,i.parentNode.replaceChild(s,i),o}},{key:"wrapRangeInMappedTextNode",value:function(e,t,r,n,i){var o=this;e.nodes.every(function(s,a){var u=e.nodes[a+1];if(void 0===u||u.start>t){if(!n(s.node))return!1;var c=t-s.start,l=(r>s.end?s.end:r)-s.start,f=e.value.substr(0,s.start),h=e.value.substr(l+s.start);if(s.node=o.wrapRangeInTextNode(s.node,c,l),e.value=f+h,e.nodes.forEach(function(t,r){r>=a&&(e.nodes[r].start>0&&r!==a&&(e.nodes[r].start-=l),e.nodes[r].end-=l)}),r-=l,i(s.node.previousSibling,s.start),!(r>s.end))return!1;t=s.end}return!0})}},{key:"wrapMatches",value:function(e,t,r,n,i){var o=this,s=0===t?0:t+1;this.getTextNodes(function(t){t.nodes.forEach(function(t){t=t.node;for(var i=void 0;null!==(i=e.exec(t.textContent))&&""!==i[s];)if(r(i[s],t)){var a=i.index;if(0!==s)for(var u=1;u<s;u++)a+=i[u].length;t=o.wrapRangeInTextNode(t,a,a+i[s].length),n(t.previousSibling),e.lastIndex=0}}),i()})}},{key:"wrapMatchesAcrossElements",value:function(e,t,r,n,i){var o=this,s=0===t?0:t+1;this.getTextNodes(function(t){for(var a=void 0;null!==(a=e.exec(t.value))&&""!==a[s];){var u=a.index;if(0!==s)for(var c=1;c<s;c++)u+=a[c].length;var l=u+a[s].length;o.wrapRangeInMappedTextNode(t,u,l,function(e){return r(a[s],e)},function(t,r){e.lastIndex=r,n(t)})}i()})}},{key:"wrapRangeFromIndex",value:function(e,t,r,n){var i=this;this.getTextNodes(function(o){var s=o.value.length;e.forEach(function(e,n){var a=i.checkWhitespaceRanges(e,s,o.value),u=a.start,c=a.end,l=a.valid;l&&i.wrapRangeInMappedTextNode(o,u,c,function(r){return t(r,e,o.value.substring(u,c),n)},function(t){r(t,e)})}),n()})}},{key:"unwrapMatches",value:function(e){for(var t=e.parentNode,r=document.createDocumentFragment();e.firstChild;)r.appendChild(e.removeChild(e.firstChild));t.replaceChild(r,e),this.ie?this.normalizeTextNode(t):t.normalize()}},{key:"normalizeTextNode",value:function(e){if(e){if(3===e.nodeType)for(;e.nextSibling&&3===e.nextSibling.nodeType;)e.nodeValue+=e.nextSibling.nodeValue,e.parentNode.removeChild(e.nextSibling);else this.normalizeTextNode(e.firstChild);this.normalizeTextNode(e.nextSibling)}}},{key:"markRegExp",value:function(e,t){var r=this;this.opt=t,this.log('Searching with expression "'+e+'"');var n=0,i="wrapMatches";this.opt.acrossElements&&(i="wrapMatchesAcrossElements"),this[i](e,this.opt.ignoreGroups,function(e,t){return r.opt.filter(t,e,n)},function(e){n++,r.opt.each(e)},function(){0===n&&r.opt.noMatch(e),r.opt.done(n)})}},{key:"mark",value:function(e,t){var r=this;this.opt=t;var n=0,i="wrapMatches",o=this.getSeparatedKeywords("string"==typeof e?[e]:e),s=o.keywords,a=o.length,u=this.opt.caseSensitive?"":"i";this.opt.acrossElements&&(i="wrapMatchesAcrossElements"),0===a?this.opt.done(n):function e(t){var o=new RegExp(r.createRegExp(t),"gm"+u),c=0;r.log('Searching with expression "'+o+'"'),r[i](o,1,function(e,i){return r.opt.filter(i,t,n,c)},function(e){c++,n++,r.opt.each(e)},function(){0===c&&r.opt.noMatch(t),s[a-1]===t?r.opt.done(n):e(s[s.indexOf(t)+1])})}(s[0])}},{key:"markRanges",value:function(e,t){var r=this;this.opt=t;var n=0,i=this.checkRanges(e);i&&i.length?(this.log("Starting to mark with the following ranges: "+JSON.stringify(i)),this.wrapRangeFromIndex(i,function(e,t,n,i){return r.opt.filter(e,t,n,i)},function(e,t){n++,r.opt.each(e,t)},function(){r.opt.done(n)})):this.opt.done(n)}},{key:"unmark",value:function(e){var t=this;this.opt=e;var r=this.opt.element?this.opt.element:"*";r+="[data-markjs]",this.opt.className&&(r+="."+this.opt.className),this.log('Removal selector "'+r+'"'),this.iterator.forEachNode(NodeFilter.SHOW_ELEMENT,function(e){t.unwrapMatches(e)},function(e){var n=i.matches(e,r),o=t.matchesExclude(e);return!n||o?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 i(this.ctx,this.opt.iframes,this.opt.exclude,this.opt.iframesTimeout)}}]),o}();return function(e){var t=this,r=new o(e);return this.mark=function(e,n){return r.mark(e,n),t},this.markRegExp=function(e,n){return r.markRegExp(e,n),t},this.markRanges=function(e,n){return r.markRanges(e,n),t},this.unmark=function(e){return r.unmark(e),t},this}}()},function(e,t,r){"use strict";var n=r(2),i=r(10),o=r(5),s=r(24),a=r(0);e.exports=function(e,t,r){var u=a(e),c=r(s,u,""[e]),l=c[0],f=c[1];o(function(){var t={};return t[u]=function(){return 7},7!=""[e](t)})&&(i(String.prototype,e,l),n(RegExp.prototype,u,2==t?function(e,t){return f.call(e,this,t)}:function(e){return f.call(e,this)}))}},function(e,t,r){var n=r(0)("unscopables"),i=Array.prototype;void 0==i[n]&&r(2)(i,n,{}),e.exports=function(e){i[n][e]=!0}},function(e,t,r){var n=r(41),i=r(22).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return n(e,i)}},function(e,t,r){var n=r(14),i=r(73),o=r(22),s=r(23)("IE_PROTO"),a=function(){},u=function(){var e,t=r(45)("iframe"),n=o.length;for(t.style.display="none",r(72).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),u=e.F;n--;)delete u.prototype[o[n]];return u()};e.exports=Object.create||function(e,t){var r;return null!==e?(a.prototype=n(e),r=new a,a.prototype=null,r[s]=e):r=u(),void 0===t?r:i(r,t)}},function(e,t,r){var n=r(25);e.exports=Array.isArray||function(e){return"Array"==n(e)}},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t){var r=Math.ceil,n=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?n:r)(e)}},function(e,t,r){var n=r(38),i=Math.min;e.exports=function(e){return e>0?i(n(e),9007199254740991):0}},function(e,t,r){var n=r(25);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==n(e)?e.split(""):Object(e)}},function(e,t,r){var n=r(7),i=r(8),o=r(75)(!1),s=r(23)("IE_PROTO");e.exports=function(e,t){var r,a=i(e),u=0,c=[];for(r in a)r!=s&&n(a,r)&&c.push(r);for(;t.length>u;)n(a,r=t[u++])&&(~o(c,r)||c.push(r));return c}},function(e,t,r){t.f=r(0)},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,r){var n=r(43);e.exports=function(e,t,r){if(n(e),void 0===t)return e;switch(r){case 1:return function(r){return e.call(t,r)};case 2:return function(r,n){return e.call(t,r,n)};case 3:return function(r,n,i){return e.call(t,r,n,i)}}return function(){return e.apply(t,arguments)}}},function(e,t,r){var n=r(3),i=r(1).document,o=n(i)&&n(i.createElement);e.exports=function(e){return o?i.createElement(e):{}}},function(e,t,r){e.exports=!r(6)&&!r(5)(function(){return 7!=Object.defineProperty(r(45)("div"),"a",{get:function(){return 7}}).a})},function(e,t,r){var n,i; /** * lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 2.1.6 * Copyright (C) 2018 Oliver Nightingale * @license MIT */!function(){var o,s,a,u,c,l,f,h,p,d,v,y,g,m,x,w,b,k,S,E,O,T,L,I,j,N,P=function(e){var t=new P.Builder;return t.pipeline.add(P.trimmer,P.stopWordFilter,P.stemmer),t.searchPipeline.add(P.stemmer),e.call(t,t),t.build()};P.version="2.1.6" /*! * lunr.utils * Copyright (C) 2018 Oliver Nightingale */,P.utils={},P.utils.warn=(o=this,function(e){o.console&&console.warn&&console.warn(e)}),P.utils.asString=function(e){return void 0===e||null===e?"":e.toString()},P.FieldRef=function(e,t,r){this.docRef=e,this.fieldName=t,this._stringValue=r},P.FieldRef.joiner="/",P.FieldRef.fromString=function(e){var t=e.indexOf(P.FieldRef.joiner);if(-1===t)throw"malformed field ref string";var r=e.slice(0,t),n=e.slice(t+1);return new P.FieldRef(n,r,e)},P.FieldRef.prototype.toString=function(){return void 0==this._stringValue&&(this._stringValue=this.fieldName+P.FieldRef.joiner+this.docRef),this._stringValue},P.idf=function(e,t){var r=0;for(var n in e)"_index"!=n&&(r+=Object.keys(e[n]).length);var i=(t-r+.5)/(r+.5);return Math.log(1+Math.abs(i))},P.Token=function(e,t){this.str=e||"",this.metadata=t||{}},P.Token.prototype.toString=function(){return this.str},P.Token.prototype.update=function(e){return this.str=e(this.str,this.metadata),this},P.Token.prototype.clone=function(e){return e=e||function(e){return e},new P.Token(e(this.str,this.metadata),this.metadata)} /*! * lunr.tokenizer * Copyright (C) 2018 Oliver Nightingale */,P.tokenizer=function(e){if(null==e||void 0==e)return[];if(Array.isArray(e))return e.map(function(e){return new P.Token(P.utils.asString(e).toLowerCase())});for(var t=e.toString().trim().toLowerCase(),r=t.length,n=[],i=0,o=0;i<=r;i++){var s=i-o;(t.charAt(i).match(P.tokenizer.separator)||i==r)&&(s>0&&n.push(new P.Token(t.slice(o,i),{position:[o,s],index:n.length})),o=i+1)}return n},P.tokenizer.separator=/[\s\-]+/ /*! * lunr.Pipeline * Copyright (C) 2018 Oliver Nightingale */,P.Pipeline=function(){this._stack=[]},P.Pipeline.registeredFunctions=Object.create(null),P.Pipeline.registerFunction=function(e,t){t in this.registeredFunctions&&P.utils.warn("Overwriting existing registered function: "+t),e.label=t,P.Pipeline.registeredFunctions[e.label]=e},P.Pipeline.warnIfFunctionNotRegistered=function(e){e.label&&e.label in this.registeredFunctions||P.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",e)},P.Pipeline.load=function(e){var t=new P.Pipeline;return e.forEach(function(e){var r=P.Pipeline.registeredFunctions[e];if(!r)throw new Error("Cannot load unregistered function: "+e);t.add(r)}),t},P.Pipeline.prototype.add=function(){Array.prototype.slice.call(arguments).forEach(function(e){P.Pipeline.warnIfFunctionNotRegistered(e),this._stack.push(e)},this)},P.Pipeline.prototype.after=function(e,t){P.Pipeline.warnIfFunctionNotRegistered(t);var r=this._stack.indexOf(e);if(-1==r)throw new Error("Cannot find existingFn");r+=1,t