From ac4896e47151978d6604a38c12bb45684c2337de Mon Sep 17 00:00:00 2001
From: Lovell Fuller "+e+"
\n":"'+(n?e:$(e,!0))+"
"},x.prototype.blockquote=function(e){return""+(n?e:$(e,!0))+"
\n"+e+"
\n"},x.prototype.html=function(e){return e},x.prototype.heading=function(e,t,n){return this.options.headerIds?"
\n":"
\n"},x.prototype.list=function(e,t,n,r){var i=t?"ol":"ul";return"<"+i+(t&&1!==n?' start="'+n+'"':"")+(r?' class="contains-task-list"':"")+">\n"+e+""+i+">\n"},x.prototype.listitem=function(e,t){return"\n\n"+e+"\n"+t+"
\n"},x.prototype.tablerow=function(e){return"\n"+e+" \n"},x.prototype.tablecell=function(e,t){var n=t.header?"th":"td";return(t.align?"<"+n+' align="'+t.align+'">':"<"+n+">")+e+""+n+">\n"},x.prototype.strong=function(e){return""+e+""},x.prototype.em=function(e){return""+e+""},x.prototype.codespan=function(e){return""+e+"
"},x.prototype.br=function(){return this.options.xhtml?"
":"
"},x.prototype.del=function(e){return""+e+""},x.prototype.link=function(e,t,n){if(this.options.sanitize){try{var r=decodeURIComponent(S(e)).replace(/[^\w:]/g,"").toLowerCase()}catch(c){return n}if(0===r.indexOf("javascript:")||0===r.indexOf("vbscript:")||0===r.indexOf("data:"))return n}this.options.baseUrl&&!L.test(e)&&(e=E(this.options.baseUrl,e));try{e=encodeURI(e).replace(/%25/g,"%")}catch(c){return n}var i=/^https?:\/\//.test(e),o=/^mailto:/.test(e),a=i||o?"a":"router-link",s="<"+a+" "+("a"===a?"href":"to")+'="'+$(i?e:function(e){var t=e.split("#"),n=t[0],r=t[1];return y.test(n)&&(n=n.replace(y,"")),n+(r?"#"+r:"")}(S(e)))+'"';return t&&(s+=' title="'+t+'"'),i&&(s+=' target="_blank" rel="noopener noreferrer"',n+="\n
"+$(c.message+"",!0)+"";throw c}}j.exec=j,R.options=R.setOptions=function(e){return I(R.defaults,e),R},R.getDefaults=function(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:new x,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tables:!0,xhtml:!1}},R.defaults=R.getDefaults(),R.Parser=A,R.parser=A.parse,R.Renderer=x,R.TextRenderer=C,R.Lexer=_,R.lexer=_.lex,R.InlineLexer=w,R.inlineLexer=w.output,R.parse=R,R.escape=$,R.unescape=S;var P=R,N=n(27),z=n.n(N);function D(e,t){if(!t)return e;var n=t&&z.a.languages[t];return n||(t="markup",n=z.a.languages.markup),z.a.highlight(e,n,t)}var H=function(e){return/^https?:\/\//.test(e)},B=function(e,t){return((e=(e=e||".").replace(/\/$/,""))+t).replace(/^\.\//,"")},G=function(e){return e=e.replace(/^\/?/,"/"),/\.md$/.test(e)||(e=/\/$/.test(e)?e+"README.md":e+".md"),e},U="undefined"!==typeof window,Z=function(e){var t=new P.Renderer,n=[];t.heading=function(e,t,r){var i=this.options.env,o=r.trim().replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-").toLowerCase();n.push(o);var a=n.filter((function(e){return e===o})).length;if(a>1&&(o+="-"+a),1===t)return i.title=e,"";2===t&&i.headings.push({level:t,raw:r,text:r.replace(/<.*>\s*$/g,""),slug:o});var s="h"+t;return"<"+s+' class="markdown-header" id="'+o+'">\n
"+e+"
"};var r=t.code;return t.code=function(e,t,n,i){i=i||{};var o=this.options.env;if(i.mixin)return o.mixins.push(e),"";var a=r.call(this,e,t,n);if(i.interpolate||(a=a.replace(/^/,"")),i.highlight){var s=e.split("\n").map((function(e,t){t+=1;var n=i.highlight.some((function(e){if("number"===typeof e)return e===t;if("string"===typeof e){var n=e.split("-").map(Number),r=n[0],i=n[1];return t>=r&&(!i||t<=i)}return!1})),r=e?P.escape(e):"";return n?''+r+"":''+r+""})).join("");a+="'+s+""}return''+a+""},e.process("extendMarkedRenderer",t)},q=n(29),V=n.n(q),K=n(28),J={accentColor:"#009688",pageBackground:"#fff",headerBackground:"#fff",headerTextColor:"var(--text-color)",textColor:"#000",linkColor:"var(--accent-color)",sidebarWidth:"280px",sidebarBackground:"var(--page-background)",sidebarLinkColor:"#444",sidebarLinkActiveColor:"#000",sidebarLinkArrowColor:"#999",mainBackground:"var(--page-background)",borderColor:"#eaeaea",headerHeight:"55px",codeFont:"SFMono-Regular,Consolas,Liberation Mono,Menlo,Courier,monospace",tipColor:"rgb(6, 125, 247)",successColor:"#42b983",warningColor:"#ff9800",dangerColor:"rgb(255, 0, 31)",navLinkColor:"#2c3e50",navLinkBorderColor:"var(--accent-color)",codeBlockBackground:"#011627",codeBlockTextColor:"white",codeBlockShadowColor:"#333",codeBlockShadowWidth:"0px",highlightedLineBackground:"#022a4b",highlightedLineBorderColor:"#ffa7c4",inlineCodeColor:"rgb(116, 66, 16)",inlineCodeBackground:"rgb(254, 252, 191)",loaderPrimaryColor:"#f3f3f3",loaderSecondaryColor:"#ecebeb",tableHeaderBackground:"#fafafa",tableHeaderColor:"#666",docuteSelectHeight:"38px",searchIconColor:"#999",searchFocusBorderColor:"#ccc",searchFocusIconColor:"#333",searchResultHoverBackground:"#f9f9f9"},W=Object.assign({},J,{headerBackground:"var(--page-background)",sidebarLinkColor:"var(--text-color)",sidebarLinkActiveColor:"var(--text-color)",textColor:"hsla(0,0%,100%,0.88)",pageBackground:"#2f3136",navLinkColor:"var(--text-color)",borderColor:"#3e4147",highlightedLineBackground:"#022a4b",highlightedLineBorderColor:"#ffa7c4",inlineCodeColor:"#e6e6e6",inlineCodeBackground:"#373c49",loaderPrimaryColor:"hsla(0, 0%, 100%, 0.08)",loaderSecondaryColor:"hsla(0, 0%, 100%, 0.18)",contentLinkBorder:"2px solid hsla(0, 0%, 100%, 0.28)",contentLinkHoverBorderColor:"currentColor",tableHeaderBackground:"var(--border-color)",tableHeaderColor:"#868686",searchIconColor:"#999",searchFocusBorderColor:"#999",searchFocusIconColor:"#ccc",searchResultBackground:"#27292f",searchResultHoverBackground:"#1e2025"});function Y(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}r.a.use(m.a);var X=U&&window.__DOCUTE_INITIAL_STATE__,Q=new m.a.Store({state:Object.assign({originalConfig:{},page:{title:null,headings:null,html:""},env:{},showSidebar:!1,fetchingFile:!0},X),mutations:{SET_CONFIG:function(e,t){void 0===t&&(t={}),t.layout=t.layout||"narrow",t.centerContent&&(t.layout="narrow"),t.theme=function(e,t){var n=t.theme,r=t.detectSystemDarkTheme;if(!U||!r)return n||"default";var i=window.matchMedia("(prefers-color-scheme: dark)");return i.addListener((function(){e.commit("SET_THEME",i.matches?"dark":"default")})),n||(i.matches?"dark":"default")}(Q,t),e.originalConfig=t},SET_PAGE:function(e,t){e.page=t},TOGGLE_SIDEBAR:function(e,t){e.showSidebar="boolean"===typeof t?t:!e.showSidebar},SET_FETCHING:function(e,t){e.fetchingFile=t},SET_ENV:function(e,t){e.env=t},SET_THEME:function(e,t){e.originalConfig.theme=t}},actions:{fetchFile:function(e,t){var n=e.commit,r=e.getters,i=e.dispatch;try{n("TOGGLE_SIDEBAR",!1),n("SET_FETCHING",!0);var o=Object.assign({markdown:!0},r.config.routes&&r.config.routes[t]);if(!o.content&&!o.file){var a=G(t);o.file=B(r.config.sourcePath,a),o.editLink=r.config.editLinkBase&&B(r.config.editLinkBase,a)}return Y(Promise.all([!o.content&&fetch(o.file,r.config.fetchOptions).then((function(e){return e.text()})).then((function(e){o.content=e})),i("fetchPrismLanguages")]),(function(){return Y(f.processPromise("processMarkdown",o.content),(function(e){return o.content=e,Y(f.processPromise("processPage",o),(function(e){o=e;var t={headings:[],mixins:[],config:r.config};return o.markdown&&(o.content=P(o.content,{renderer:Z(f),highlight:D,env:t})),Y(f.processPromise("processHTML",o.content),(function(e){o.content=e,o.headings=t.headings,o.title||(o.title=t.title),n("SET_PAGE",o),n("SET_ENV",t),n("SET_FETCHING",!1)}))}))}))}))}catch(s){return Promise.reject(s)}},fetchPrismLanguages:function(e){var t,n,r=e.getters.config.highlight;return r&&0!==r.length?(t=r.reduce((function(e,t){return K[t]&&(e=e.concat(K[t])),e.push(t),e}),[]).filter((function(e,t,n){return n.indexOf(e)===t&&-1===K.builtin.indexOf(e)})).map((function(e){return"https://unpkg.com/prismjs@1.17.1/components/prism-"+e+".js"})),n="prism-languages",new Promise((function(e){if(V.a.isDefined(n))return e();V()(t,n,{success:e,error:function(t){console.error("Deps not found:",t),e()}})}))):Promise.resolve()}},getters:{target:function(e){var t=e.originalConfig.target;return t?"#"===t[0]?t.slice(1):t:"docute"},languageOverrides:function(e){var t=e.originalConfig,n=t.overrides||t.locales;return n&&Object.keys(n).reduce((function(e,t){return n[t].language&&(e[t]=n[t]),e}),{})},currentLocalePath:function(e,t){var n=e.route,r=t.languageOverrides;if(r)for(var i=0,o=Object.keys(r);i-1}function ne(e,t){return t instanceof e||t&&(t.name===e.name||t._name===e._name)}function re(e,t){for(var n in t)e[n]=t[n];return e}var ie={name:"RouterView",functional:!0,props:{name:{type:String,default:"default"}},render:function(e,t){var n=t.props,r=t.children,i=t.parent,o=t.data;o.routerView=!0;for(var a=i.$createElement,s=n.name,c=i.$route,u=i._routerViewCache||(i._routerViewCache={}),l=0,f=!1;i&&i._routerRoot!==i;){var p=i.$vnode&&i.$vnode.data;p&&(p.routerView&&l++,p.keepAlive&&i._inactive&&(f=!0)),i=i.$parent}if(o.routerViewDepth=l,f)return a(u[s],o,r);var d=c.matched[l];if(!d)return u[s]=null,a();var h=u[s]=d.components[s];o.registerRouteInstance=function(e,t){var n=d.instances[s];(t&&n!==e||!t&&n===e)&&(d.instances[s]=t)},(o.hook||(o.hook={})).prepatch=function(e,t){d.instances[s]=t.componentInstance},o.hook.init=function(e){e.data.keepAlive&&e.componentInstance&&e.componentInstance!==d.instances[s]&&(d.instances[s]=e.componentInstance)};var v=o.props=function(e,t){switch(typeof t){case"undefined":return;case"object":return t;case"function":return t(e);case"boolean":return t?e.params:void 0;default:0}}(c,d.props&&d.props[s]);if(v){v=o.props=re({},v);var m=o.attrs=o.attrs||{};for(var g in v)h.props&&g in h.props||(m[g]=v[g],delete v[g])}return a(h,o,r)}};var oe=/[!'()*]/g,ae=function(e){return"%"+e.charCodeAt(0).toString(16)},se=/%2C/g,ce=function(e){return encodeURIComponent(e).replace(oe,ae).replace(se,",")},ue=decodeURIComponent;function le(e){var t={};return(e=e.trim().replace(/^(\?|#|&)/,""))?(e.split("&").forEach((function(e){var n=e.replace(/\+/g," ").split("="),r=ue(n.shift()),i=n.length>0?ue(n.join("=")):null;void 0===t[r]?t[r]=i:Array.isArray(t[r])?t[r].push(i):t[r]=[t[r],i]})),t):t}function fe(e){var t=e?Object.keys(e).map((function(t){var n=e[t];if(void 0===n)return"";if(null===n)return ce(t);if(Array.isArray(n)){var r=[];return n.forEach((function(e){void 0!==e&&(null===e?r.push(ce(t)):r.push(ce(t)+"="+ce(e)))})),r.join("&")}return ce(t)+"="+ce(n)})).filter((function(e){return e.length>0})).join("&"):null;return t?"?"+t:""}var pe=/\/?$/;function de(e,t,n,r){var i=r&&r.options.stringifyQuery,o=t.query||{};try{o=he(o)}catch(s){}var a={name:t.name||e&&e.name,meta:e&&e.meta||{},path:t.path||"/",hash:t.hash||"",query:o,params:t.params||{},fullPath:ge(t,i),matched:e?me(e):[]};return n&&(a.redirectedFrom=ge(n,i)),Object.freeze(a)}function he(e){if(Array.isArray(e))return e.map(he);if(e&&"object"===typeof e){var t={};for(var n in e)t[n]=he(e[n]);return t}return e}var ve=de(null,{path:"/"});function me(e){for(var t=[];e;)t.unshift(e),e=e.parent;return t}function ge(e,t){var n=e.path,r=e.query;void 0===r&&(r={});var i=e.hash;return void 0===i&&(i=""),(n||"/")+(t||fe)(r)+i}function ye(e,t){return t===ve?e===t:!!t&&(e.path&&t.path?e.path.replace(pe,"")===t.path.replace(pe,"")&&e.hash===t.hash&&be(e.query,t.query):!(!e.name||!t.name)&&(e.name===t.name&&e.hash===t.hash&&be(e.query,t.query)&&be(e.params,t.params)))}function be(e,t){if(void 0===e&&(e={}),void 0===t&&(t={}),!e||!t)return e===t;var n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every((function(n){var r=e[n],i=t[n];return"object"===typeof r&&"object"===typeof i?be(r,i):String(r)===String(i)}))}function _e(e,t,n){var r=e.charAt(0);if("/"===r)return e;if("?"===r||"#"===r)return t+e;var i=t.split("/");n&&i[i.length-1]||i.pop();for(var o=e.replace(/^\//,"").split("/"),a=0;a =0&&(t=e.slice(r),e=e.slice(0,r));var i=e.indexOf("?");return i>=0&&(n=e.slice(i+1),e=e.slice(0,i)),{path:e,query:n,hash:t}}(i.path||""),c=t&&t.path||"/",u=s.path?_e(s.path,c,n||i.append):c,l=function(e,t,n){void 0===t&&(t={});var r,i=n||le;try{r=i(e||"")}catch(a){r={}}for(var o in t)r[o]=t[o];return r}(s.query,i.query,r&&r.options.parseQuery),f=i.hash||s.hash;return f&&"#"!==f.charAt(0)&&(f="#"+f),{_normalized:!0,path:u,query:l,hash:f}}var He,Be=[String,Object],Ge=[String,Array],Ue=function(){},Ze={name:"RouterLink",props:{to:{type:Be,required:!0},tag:{type:String,default:"a"},exact:Boolean,append:Boolean,replace:Boolean,activeClass:String,exactActiveClass:String,event:{type:Ge,default:"click"}},render:function(e){var t=this,n=this.$router,r=this.$route,i=n.resolve(this.to,r,this.append),o=i.location,a=i.route,s=i.href,c={},u=n.options.linkActiveClass,l=n.options.linkExactActiveClass,f=null==u?"router-link-active":u,p=null==l?"router-link-exact-active":l,d=null==this.activeClass?f:this.activeClass,h=null==this.exactActiveClass?p:this.exactActiveClass,v=a.redirectedFrom?de(null,De(a.redirectedFrom),null,n):a;c[h]=ye(r,v),c[d]=this.exact?c[h]:function(e,t){return 0===e.path.replace(pe,"/").indexOf(t.path.replace(pe,"/"))&&(!t.hash||e.hash===t.hash)&&function(e,t){for(var n in t)if(!(n in e))return!1;return!0}(e.query,t.query)}(r,v);var m=function(e){qe(e)&&(t.replace?n.replace(o,Ue):n.push(o,Ue))},g={click:qe};Array.isArray(this.event)?this.event.forEach((function(e){g[e]=m})):g[this.event]=m;var y={class:c},b=!this.$scopedSlots.$hasNormal&&this.$scopedSlots.default&&this.$scopedSlots.default({href:s,route:a,navigate:m,isActive:c[d],isExactActive:c[h]});if(b){if(1===b.length)return b[0];if(b.length>1||!b.length)return 0===b.length?e():e("span",{},b)}if("a"===this.tag)y.on=g,y.attrs={href:s};else{var _=function e(t){if(t)for(var n,r=0;r -1&&(s.params[p]=n.params[p]);return s.path=ze(l.path,s.params),c(l,s,a)}if(s.path){s.params={};for(var d=0;d =e.length?n():e[i]?t(e[i],(function(){r(i+1)})):r(i+1)};r(0)}function mt(e){return function(t,n,r){var i=!1,o=0,a=null;gt(e,(function(e,t,n,s){if("function"===typeof e&&void 0===e.cid){i=!0,o++;var c,u=_t((function(t){var i;((i=t).__esModule||bt&&"Module"===i[Symbol.toStringTag])&&(t=t.default),e.resolved="function"===typeof t?t:He.extend(t),n.components[s]=t,--o<=0&&r()})),l=_t((function(e){var t="Failed to resolve async component "+s+": "+e;a||(a=te(e)?e:new Error(t),r(a))}));try{c=e(u,l)}catch(p){l(p)}if(c)if("function"===typeof c.then)c.then(u,l);else{var f=c.component;f&&"function"===typeof f.then&&f.then(u,l)}}})),i||r()}}function gt(e,t){return yt(e.map((function(e){return Object.keys(e.components).map((function(n){return t(e.components[n],e.instances[n],e,n)}))})))}function yt(e){return Array.prototype.concat.apply([],e)}var bt="function"===typeof Symbol&&"symbol"===typeof Symbol.toStringTag;function _t(e){var t=!1;return function(){for(var n=[],r=arguments.length;r--;)n[r]=arguments[r];if(!t)return t=!0,e.apply(this,n)}}var kt=function(e){function t(t){e.call(this),this.name=this._name="NavigationDuplicated",this.message='Navigating to current location ("'+t.fullPath+'") is not allowed',Object.defineProperty(this,"stack",{value:(new e).stack,writable:!0,configurable:!0})}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(Error);kt._name="NavigationDuplicated";var wt=function(e,t){this.router=e,this.base=function(e){if(!e)if(Ve){var t=document.querySelector("base");e=(e=t&&t.getAttribute("href")||"/").replace(/^https?:\/\/[^\/]+/,"")}else e="/";"/"!==e.charAt(0)&&(e="/"+e);return e.replace(/\/$/,"")}(t),this.current=ve,this.pending=null,this.ready=!1,this.readyCbs=[],this.readyErrorCbs=[],this.errorCbs=[]};function xt(e,t,n,r){var i=gt(e,(function(e,r,i,o){var a=function(e,t){"function"!==typeof e&&(e=He.extend(e));return e.options[t]}(e,t);if(a)return Array.isArray(a)?a.map((function(e){return n(e,r,i,o)})):n(a,r,i,o)}));return yt(r?i.reverse():i)}function Ct(e,t){if(t)return function(){return e.apply(t,arguments)}}wt.prototype.listen=function(e){this.cb=e},wt.prototype.onReady=function(e,t){this.ready?e():(this.readyCbs.push(e),t&&this.readyErrorCbs.push(t))},wt.prototype.onError=function(e){this.errorCbs.push(e)},wt.prototype.transitionTo=function(e,t,n){var r=this,i=this.router.match(e,this.current);this.confirmTransition(i,(function(){r.updateRoute(i),t&&t(i),r.ensureURL(),r.ready||(r.ready=!0,r.readyCbs.forEach((function(e){e(i)})))}),(function(e){n&&n(e),e&&!r.ready&&(r.ready=!0,r.readyErrorCbs.forEach((function(t){t(e)})))}))},wt.prototype.confirmTransition=function(e,t,n){var r=this,i=this.current,o=function(e){!ne(kt,e)&&te(e)&&(r.errorCbs.length?r.errorCbs.forEach((function(t){t(e)})):console.error(e)),n&&n(e)};if(ye(e,i)&&e.matched.length===i.matched.length)return this.ensureURL(),o(new kt(e));var a=function(e,t){var n,r=Math.max(e.length,t.length);for(n=0;n -1?decodeURI(e.slice(0,r))+e.slice(r):decodeURI(e)}else n>-1&&(e=decodeURI(e.slice(0,n))+e.slice(n));return e}function Tt(e){var t=window.location.href,n=t.indexOf("#");return(n>=0?t.slice(0,n):t)+"#"+e}function Lt(e){pt?dt(Tt(e)):window.location.hash=e}function jt(e){pt?ht(Tt(e)):window.location.replace(Tt(e))}var It=function(e){function t(t,n){e.call(this,t,n),this.stack=[],this.index=-1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.push=function(e,t,n){var r=this;this.transitionTo(e,(function(e){r.stack=r.stack.slice(0,r.index+1).concat(e),r.index++,t&&t(e)}),n)},t.prototype.replace=function(e,t,n){var r=this;this.transitionTo(e,(function(e){r.stack=r.stack.slice(0,r.index).concat(e),t&&t(e)}),n)},t.prototype.go=function(e){var t=this,n=this.index+e;if(!(n<0||n>=this.stack.length)){var r=this.stack[n];this.confirmTransition(r,(function(){t.index=n,t.updateRoute(r)}),(function(e){ne(kt,e)&&(t.index=n)}))}},t.prototype.getCurrentLocation=function(){var e=this.stack[this.stack.length-1];return e?e.fullPath:"/"},t.prototype.ensureURL=function(){},t}(wt),Ft=function(e){void 0===e&&(e={}),this.app=null,this.apps=[],this.options=e,this.beforeHooks=[],this.resolveHooks=[],this.afterHooks=[],this.matcher=We(e.routes||[],this);var t=e.mode||"hash";switch(this.fallback="history"===t&&!pt&&!1!==e.fallback,this.fallback&&(t="hash"),Ve||(t="abstract"),this.mode=t,t){case"history":this.history=new At(this,e.base);break;case"hash":this.history=new St(this,e.base,this.fallback);break;case"abstract":this.history=new It(this,e.base);break;default:0}},Mt={currentRoute:{configurable:!0}};function Rt(e,t){return e.push(t),function(){var n=e.indexOf(t);n>-1&&e.splice(n,1)}}Ft.prototype.match=function(e,t,n){return this.matcher.match(e,t,n)},Mt.currentRoute.get=function(){return this.history&&this.history.current},Ft.prototype.init=function(e){var t=this;if(this.apps.push(e),e.$once("hook:destroyed",(function(){var n=t.apps.indexOf(e);n>-1&&t.apps.splice(n,1),t.app===e&&(t.app=t.apps[0]||null)})),!this.app){this.app=e;var n=this.history;if(n instanceof At)n.transitionTo(n.getCurrentLocation());else if(n instanceof St){var r=function(){n.setupListeners()};n.transitionTo(n.getCurrentLocation(),r,r)}n.listen((function(e){t.apps.forEach((function(t){t._route=e}))}))}},Ft.prototype.beforeEach=function(e){return Rt(this.beforeHooks,e)},Ft.prototype.beforeResolve=function(e){return Rt(this.resolveHooks,e)},Ft.prototype.afterEach=function(e){return Rt(this.afterHooks,e)},Ft.prototype.onReady=function(e,t){this.history.onReady(e,t)},Ft.prototype.onError=function(e){this.history.onError(e)},Ft.prototype.push=function(e,t,n){var r=this;if(!t&&!n&&"undefined"!==typeof Promise)return new Promise((function(t,n){r.history.push(e,t,n)}));this.history.push(e,t,n)},Ft.prototype.replace=function(e,t,n){var r=this;if(!t&&!n&&"undefined"!==typeof Promise)return new Promise((function(t,n){r.history.replace(e,t,n)}));this.history.replace(e,t,n)},Ft.prototype.go=function(e){this.history.go(e)},Ft.prototype.back=function(){this.go(-1)},Ft.prototype.forward=function(){this.go(1)},Ft.prototype.getMatchedComponents=function(e){var t=e?e.matched?e:this.resolve(e).route:this.currentRoute;return t?[].concat.apply([],t.matched.map((function(e){return Object.keys(e.components).map((function(t){return e.components[t]}))}))):[]},Ft.prototype.resolve=function(e,t,n){var r=De(e,t=t||this.history.current,n,this),i=this.match(r,t),o=i.redirectedFrom||i.fullPath;return{location:r,route:i,href:function(e,t,n){var r="hash"===n?"#"+t:t;return e?ke(e+"/"+r):r}(this.history.base,o,this.mode),normalizedTo:r,resolved:i}},Ft.prototype.addRoutes=function(e){this.matcher.addRoutes(e),this.history.current!==ve&&this.history.transitionTo(this.history.getCurrentLocation())},Object.defineProperties(Ft.prototype,Mt),Ft.install=function e(t){if(!e.installed||He!==t){e.installed=!0,He=t;var n=function(e){return void 0!==e},r=function(e,t){var r=e.$options._parentVnode;n(r)&&n(r=r.data)&&n(r=r.registerRouteInstance)&&r(e,t)};t.mixin({beforeCreate:function(){n(this.$options.router)?(this._routerRoot=this,this._router=this.$options.router,this._router.init(this),t.util.defineReactive(this,"_route",this._router.history.current)):this._routerRoot=this.$parent&&this.$parent._routerRoot||this,r(this,this)},destroyed:function(){r(this)}}),Object.defineProperty(t.prototype,"$router",{get:function(){return this._routerRoot._router}}),Object.defineProperty(t.prototype,"$route",{get:function(){return this._routerRoot._route}}),t.component("RouterView",ie),t.component("RouterLink",Ze);var i=t.config.optionMergeStrategies;i.beforeRouteEnter=i.beforeRouteLeave=i.beforeRouteUpdate=i.created}},Ft.version="3.1.3",Ve&&window.Vue&&window.Vue.use(Ft);var Pt=Ft,Nt="undefined"!==typeof window,zt=Nt&&navigator.connection,Dt=Nt&&(!zt||-1===(zt.effectiveType||"").indexOf("2g")&&!zt.saveData),Ht=Nt&&window.IntersectionObserver,Bt={};function Gt(e){return new Promise((function(t,n){var r=new XMLHttpRequest;r.open("GET",e,r.withCredentials=!0),r.addEventListener("load",(function(){200===r.status?t():n()})),r.send()}))}function Ut(e){return self.fetch?fetch(e,{credentials:"include"}):Gt(e)}var Zt=function(e){if(Nt){var t=document.createElement("link");return t.relList&&t.relList.supports&&t.relList.supports(e)}}("prefetch")?function(e){return new Promise((function(t,n){var r=document.createElement("link");r.rel="prefetch",r.href=e,r.addEventListener("load",t),r.addEventListener("error",n),document.head.appendChild(r)}))}:Gt;function qt(e,t){if(Dt&&!Bt[e])return(t?Ut:Zt)(e).then((function(){Bt[e]=!0}))}var Vt=function(e,t){void 0===t&&(t={});var n=t.componentName;void 0===n&&(n="RouterLink");var r=t.prefetch;void 0===r&&(r=!0);var i=Ht&&new window.IntersectionObserver((function(e){e.forEach((function(e){e.isIntersecting&&e.target._linkPrefetch()}))})),o=Nt&&window.requestIdleCallback||function(e){var t=Date.now();return setTimeout((function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-t))}})}),1)},a={name:n,extends:e.component("RouterLink")||e.component("router-link"),props:{prefetch:{type:Boolean,default:r},prefetchFiles:{type:Array},timeout:{type:Number,default:2e3}},mounted:function(){this.prefetch&&i&&Dt&&o(this.observe,{timeout:this.timeout})},beforeDestory:function(){this.unobserve()},methods:{observe:function(){i.observe(this.$el),this.$el._linkPrefetch=this.linkPrefetch,this._linkObserved=!0},unobserve:function(){this._linkObserved&&i.unobserve(this.$el)},getComponents:function(){return this.$router.getMatchedComponents(this.to).filter((function(e){return void 0===e.cid&&"function"===typeof e}))},linkPrefetch:function(){var e=this.$router.resolve(this.to).route;if(!e.meta.__prefetched){if(e.meta.__prefetched=!0,!1!==e.meta.prefetch)for(var t=0,n=this.getComponents();t 0)for(var o=0,a=i;o 1&&void 0!==arguments[1]?arguments[1]:{};switch(s=u.duration||1e3,r=u.offset||0,f=u.callback,i=u.easing||Kt,o=u.a11y||!1,t=window.scrollY||window.pageYOffset,"undefined"===typeof c?"undefined":Jt(c)){case"number":e=void 0,o=!1,n=t+c;break;case"object":n=p(e=c);break;case"string":e=document.querySelector(c),n=p(e)}switch(a=n-t+r,Jt(u.duration)){case"number":s=u.duration;break;case"function":s=u.duration(a)}window.requestAnimationFrame(d)}}(),Yt=n(30),Xt=n.n(Yt),Qt=function(){return Math.random().toString(36).substring(2)},en={name:"ContentLoader",functional:!0,props:{width:{type:Number,default:400},height:{type:Number,default:130},speed:{type:Number,default:2},preserveAspectRatio:{type:String,default:"xMidYMid meet"},baseUrl:{type:String,default:""},primaryColor:{type:String,default:"#f9f9f9"},secondaryColor:{type:String,default:"#ecebeb"},primaryOpacity:{type:Number,default:1},secondaryOpacity:{type:Number,default:1},uniqueKey:{type:String},animate:{type:Boolean,default:!0}},render:function(e,t){var n=t.props,r=t.data,i=t.children,o=n.uniqueKey?n.uniqueKey+"-idClip":Qt(),a=n.uniqueKey?n.uniqueKey+"-idGradient":Qt();return e("svg",Xt()([r,{attrs:{viewBox:"0 0 "+n.width+" "+n.height,version:"1.1",preserveAspectRatio:n.preserveAspectRatio}}]),[e("rect",{style:{fill:"url("+n.baseUrl+"#"+a+")"},attrs:{"clip-path":"url("+n.baseUrl+"#"+o+")",x:"0",y:"0",width:n.width,height:n.height}}),e("defs",[e("clipPath",{attrs:{id:o}},[i||e("rect",{attrs:{x:"0",y:"0",rx:"5",ry:"5",width:n.width,height:n.height}})]),e("linearGradient",{attrs:{id:a}},[e("stop",{attrs:{offset:"0%","stop-color":n.primaryColor,"stop-opacity":n.primaryOpacity}},[n.animate?e("animate",{attrs:{attributeName:"offset",values:"-2; 1",dur:n.speed+"s",repeatCount:"indefinite"}}):null]),e("stop",{attrs:{offset:"50%","stop-color":n.secondaryColor,"stop-opacity":n.secondaryOpacity}},[n.animate?e("animate",{attrs:{attributeName:"offset",values:"-1.5; 1.5",dur:n.speed+"s",repeatCount:"indefinite"}}):null]),e("stop",{attrs:{offset:"100%","stop-color":n.primaryColor,"stop-opacity":n.primaryOpacity}},[n.animate?e("animate",{attrs:{attributeName:"offset",values:"-1; 2",dur:n.speed+"s",repeatCount:"indefinite"}}):null])])])])}},tn={functional:!0,props:["openInNewTab","externalLinkIcon"],render:function(e,t){var n=t.data,r=t.children,i=t.props,o=i.openInNewTab,a=i.externalLinkIcon,s=Object.assign({},n.attrs),c=s.to;return H(c)?(delete s.to,delete s.prefetchFiles,e("a",Object.assign({},n,{class:[n.class,"is-external-link"],attrs:Object.assign({},s,{href:c,target:!1===o?"_self":"_blank"})}),[].concat(r,[!1===o||!1===a?null:e("external-link-icon",{class:"external-link-icon"})]))):e("router-link",n,r)}},nn=(n(37),h(tn,void 0,void 0,!1,null,null,null).exports),rn={components:{UniLink:nn},props:{nav:{type:Array,required:!0}},methods:{isExternalLink:H}},on=(n(38),h(rn,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"header-nav"},e._l(e.nav,(function(t,r){return n("div",{key:r,staticClass:"header-nav-item"},[t.children?n("div",{staticClass:"dropdown-wrapper"},[n("span",{staticClass:"dropdown-trigger"},[e._v("\n "+e._s(t.title)+"\n "),n("span",{staticClass:"arrow"})]),e._v(" "),t.children?n("ul",{staticClass:"dropdown-list"},e._l(t.children,(function(t,r){return n("li",{key:r,staticClass:"dropdown-item"},[n("uni-link",{attrs:{to:t.link,openInNewTab:t.openInNewTab,externalLinkIcon:!1}},[e._v(e._s(t.title))])],1)})),0):e._e()]):e._e(),e._v(" "),t.children?e._e():n("uni-link",{attrs:{to:t.link,openInNewTab:t.openInNewTab,externalLinkIcon:!1}},[e._v(e._s(t.title))])],1)})),0)}),[],!1,null,"93d08526",null).exports),an={props:{link:{type:Object,required:!0}}},sn=(n(39),{components:{UniLink:nn,PageToc:h(an,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return!e.$store.state.fetchingFile&&!1!==e.link.toc&&e.link.link===e.$route.path&&e.$store.state.page.headings&&e.$store.state.page.headings.length>0?n("div",{staticClass:"PageToc"},e._l(e.$store.state.page.headings,(function(t){return n("router-link",{key:t.slug,staticClass:"PageTocHeading",attrs:{to:{hash:t.slug},"data-level":t.level},domProps:{innerHTML:e._s(t.text)}})})),1):e._e()}),[],!1,null,"b4f38364",null).exports},props:{item:{type:Object,required:!0,default:function(){return{}}},open:{type:Boolean,required:!1,default:function(){return!0}}},computed:{children:function(){return this.item.children||this.item.links}},methods:{isExternalLink:H,getPrefetchFiles:function(e){var t=this.$store.getters.config,n=t.sourcePath,r=t.routes;if(r&&r[e]){var i=r[e].file;return i?[i]:[]}var o=G(e),a=B(n,o);return a?[a]:[]},getLinkTarget:function(e){return H(e)&&!1!==e.openInNewTab?"_blank":"_self"}}}),cn=(n(40),{components:{HeaderNav:on,SidebarItem:h(sn,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{class:["SidebarItem",e.item.title&&"hasTitle"]},[e.item.title&&e.children?n("div",{staticClass:"ItemTitle",class:{collapsable:!1!==e.item.collapsable},on:{click:function(t){return e.$emit("toggle")}}},[!1!==e.item.collapsable?n("span",{staticClass:"arrow",class:{open:e.open}},[n("svg",{attrs:{width:"6",height:"10",viewBox:"0 0 6 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"}},[n("path",{attrs:{d:"M1.4 8.56L4.67 5M1.4 1.23L4.66 4.7",stroke:"currentColor","stroke-linecap":"square"}})])]):e._e(),e._v(" "),n("span",[e._v(e._s(e.item.title))])]):e._e(),e._v(" "),e.item.title&&e.item.link?n("uni-link",{staticClass:"ItemLink",class:{active:e.$route.path===e.item.link},attrs:{to:e.item.link}},[e._v(e._s(e.item.title))]):e._e(),e._v(" "),e.item.title&&e.item.link?n("div",{staticClass:"ItemLinkToc"},[n("PageToc",{attrs:{link:e.item}})],1):e._e(),e._v(" "),e.children&&(e.open||!1===e.item.collapsable)?n("div",{staticClass:"ItemChildren"},e._l(e.children,(function(t,r){return n("div",{key:r,staticClass:"ItemChild"},[n("uni-link",{staticClass:"ItemChildLink",class:{active:e.$route.path===t.link},attrs:{to:t.link,openInNewTab:t.openInNewTab,prefetchFiles:e.getPrefetchFiles(t.link)}},[e._v(e._s(t.title))]),e._v(" "),n("PageToc",{attrs:{link:t}})],1)})),0):e._e()],1)}),[],!1,null,"794d5154",null).exports},data:function(){return{closedItems:[]}},watch:{"$route.path":{handler:function(){var e=this.getCurrentIndex(this.$route.path,this.$store.getters.sidebar);this.openItem(e)},immediate:!0}},methods:{openItem:function(e){this.closedItems.indexOf(e)>-1&&(this.closedItems=this.closedItems.filter((function(t){return t!==e})))},toggleItem:function(e){-1===this.closedItems.indexOf(e)?this.closedItems.push(e):this.closedItems=this.closedItems.filter((function(t){return t!==e}))},getCurrentIndex:function(e,t){for(var n=0;n "+this.pageTitle+""}},PageContent:function(){var e=this.$store.state.env,t=this.$store.getters.config.componentMixins,n={mixins:[].concat(void 0===t?[]:t,e.mixins.map((function(e){return new Function("Vue","return "+e.trim())(r.a)}))),name:"PageContent",template:' '+this.$store.state.page.content+""};return f.process("extendMarkdownComponent",n),n}},methods:{fetchFile:function(e){try{var t=this;return yn(t.$store.dispatch("fetchFile",e),(function(){return f.invoke("onContentWillUpdate",t),yn(t.$nextTick(),(function(){f.invoke("onContentUpdated",t),t.jumpToHash()}))}))}catch(n){return Promise.reject(n)}},jumpToHash:function(){var e=decodeURI(this.$route.hash);if(e){var t=document.querySelector(e);if(t){var n=document.querySelector(".Header");Wt(t,{a11y:!0,duration:0,offset:-(n.clientHeight+30)})}}},setInitialState:function(){if(/(Prerender|jsdom|PhantomJS)/i.test(navigator.userAgent)){var e=document.createElement("script");e.textContent="window.__DOCUTE_INITIAL_STATE__ = "+JSON.stringify({page:this.$store.state.page,env:this.$store.state.env,fetchingFile:!1}),document.head.appendChild(e)}},setTitle:function(){var e=this.$route.path,t=this.$store.getters,n=t.config,r=t.homePaths.indexOf(e)>-1?n.title:this.pageTitle+" - "+n.title;r=r.replace(/<(?:.|\n)*?>/gm,""),this.$ssrContext?this.$ssrContext.title=r:document.title=r}}},_n=(n(47),n(48),n(49),h(bn,(function(){var e,t=this,n=t.$createElement,r=t._self._c||n;return r("div",{staticClass:"Page",class:(e={},e["layout-"+t.$store.getters.config.layout]=!0,e)},[r("SiteHeader"),t._v(" "),r("div",{staticClass:"Wrap"},[r("Sidebar"),t._v(" "),r("SidebarMask"),t._v(" "),r("div",{staticClass:"Main"},[t.$store.state.fetchingFile?r("div",{staticClass:"Content"},[r("content-loader",{attrs:{height:160,width:400,speed:2,primaryColor:t.$store.getters.cssVariables.loaderPrimaryColor,secondaryColor:t.$store.getters.cssVariables.loaderSecondaryColor}},[r("rect",{attrs:{x:"0",y:"5",rx:"4",ry:"4",width:"117",height:"6.4"}}),t._v(" "),r("rect",{attrs:{x:"0",y:"25",rx:"3",ry:"3",width:"85",height:"6.4"}}),t._v(" "),r("rect",{attrs:{x:"0",y:"60",rx:"3",ry:"3",width:"350",height:"6.4"}}),t._v(" "),r("rect",{attrs:{x:"0",y:"80",rx:"3",ry:"3",width:"380",height:"6.4"}}),t._v(" "),r("rect",{attrs:{x:"0",y:"100",rx:"3",ry:"3",width:"201",height:"6.4"}})])],1):r("div",{staticClass:"Content"},[r("InjectedComponents",{attrs:{position:"content:start"}}),t._v(" "),t.pageTitle?r(t.MarkdownTitle,{tag:"component",staticClass:"page-title"}):t._e(),t._v(" "),r(t.PageContent,{tag:"component",class:{"has-page-title":t.pageTitle}}),t._v(" "),r("EditLink"),t._v(" "),r("PrevNextLinks"),t._v(" "),r("InjectedComponents",{attrs:{position:"content:end"}})],1)])],1)],1)}),[],!1,null,"2f23fdf8",null).exports);r.a.use(Pt),r.a.use(Vt);var kn=function(e){return new Pt(Object.assign({scrollBehavior:function(e,t,n){return n||{x:0,y:0}}},e,{routes:[{path:"*",component:_n}]}))},wn=function(e){return{functional:!0,render:function(t,n){return t(e,n.data,n.children)}}},xn={name:"ImageZoom",props:{url:{type:String},src:{type:String},alt:{type:String},border:{type:Boolean,default:!0},width:{type:[String,Number]},title:{type:String}},computed:{imageURL:function(){return this.src||this.url}},mounted:function(){(0,n(50).default)(this.$refs.img,{})}},Cn=(n(51),h(xn,(function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"ImageZoom",class:{"with-border":this.border}},[t("img",{ref:"img",attrs:{src:this.imageURL,alt:this.alt,width:this.width,title:this.title}})])}),[],!1,null,"f17c6258",null).exports),An={name:"Badge",props:{type:{type:String},color:{type:String}}},$n=(n(52),h(An,(function(e,t){return(0,t._c)("span",{class:["badge","is-"+t.props.type],style:{backgroundColor:t.props.color}},[t._t("default")],2)}),[],!0,null,null,null).exports),Sn={name:"DocuteSelect",model:{event:"change"},props:["value"],methods:{handleChange:function(e){this.$emit("change",e.target.value)}}},On=(n(53),h(Sn,(function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"DocuteSelect"},[t("select",{staticClass:"select",domProps:{value:this.value},on:{change:this.handleChange}},[this._t("default",null,null,{value:this.value})],2),this._v(" "),t("div",{staticClass:"arrow"},[t("svg",{attrs:{width:"13",height:"6",xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"#979797","fill-rule":"evenodd","stroke-linecap":"square"}},[t("path",{attrs:{d:"M1.367.375l5.185 5.303M11.685.375L6.5 5.678"}})])])])}),[],!1,null,"091fbc3d",null).exports),En={name:"Note",props:{type:{type:String,default:"note"},label:{type:[String,Boolean],default:!0}}},Tn=(n(54),h(En,(function(e,t){var n=t._c;return n("div",{class:["note","is-"+t.props.type]},[t.props.label?n("span",{staticClass:"note-label"},[t._v(t._s(!0===t.props.label?t.props.type:t.props.label)+":")]):t._e(),t._v(" "),t._t("default")],2)}),[],!0,null,null,null).exports),Ln={name:"Gist",props:{id:{type:String,required:!0}},data:function(){return{html:""}},mounted:function(){var e=this;window["gist_callback_"+this.id]=function(t){var n=document.createElement("link");n.href=t.stylesheet,n.rel="stylesheet",document.head.appendChild(n),e.html=t.div};var t=document.createElement("script");t.src="https://gist.github.com/egoist/"+this.id+".json?callback=gist_callback_"+this.id,document.head.appendChild(t)}},jn=(n(55),h(Ln,(function(){var e=this.$createElement,t=this._self._c||e;return this.html?t("div",{domProps:{innerHTML:this._s(this.html)}}):t("Loading")}),[],!1,null,null,null).exports),In={name:"Loading"},Fn=(n(56),h(In,(function(e,t){t._c;return t._m(0)}),[function(e,t){var n=t._c;return n("div",{staticClass:"loading"},[n("div",{staticClass:"dots"},[n("span"),t._v(" "),n("span"),t._v(" "),n("span")]),t._v(" "),n("span",{staticClass:"loading-text"},[t._v("Loading Gist")])])}],!0,null,"4f620c69",null).exports),Mn=h({name:"ExternalLinkIcon"},(function(e,t){var n=t._c;return n("svg",t._g(t._b({class:[t.data.staticClass,t.data.class],attrs:{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 100 100",width:"15",height:"15"}},"svg",t.data.attrs,!1),t.data.on),[n("path",{attrs:{fill:"currentColor",d:"M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"}}),t._v(" "),n("polygon",{attrs:{fill:"currentColor",points:"45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"}})])}),[],!0,null,null,null).exports,Rn={computed:{languages:function(){var e=this.$store.getters.languageOverrides;return Object.keys(e).map((function(t){return{path:t,language:e[t].language}}))}},methods:{handleChange:function(e){var t=this.$route.path.replace(new RegExp("^"+this.$store.getters.currentLocalePath),e);this.$router.push(t)}}},Pn=(n(57),h(Rn,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"LanguageSelector"},[n("DocuteSelect",{attrs:{value:e.$store.getters.currentLocalePath},on:{change:e.handleChange},scopedSlots:e._u([{key:"default",fn:function(t){var r=t.value;return[n("option",{attrs:{disabled:""}},[e._v("Choose Language")]),e._v(" "),e._l(e.languages,(function(t){return n("option",{key:t.path,domProps:{value:t.path,selected:r===t.path}},[e._v(e._s(t.language))])}))]}}])})],1)}),[],!1,null,"d5ba05fe",null).exports),Nn={name:"i18n",extend:function(e){e.store.getters.languageOverrides&&e.registerComponent("sidebar:start",Pn)}},zn={name:"hoistTags",extend:function(e){e.extendMarkedRenderer((function(e){var t=/^<(script|style)(?=(\s|>|$))/i;e.html=function(e){return e=e.trim(),t.test(e)?e.replace(/^<(script|style)/,"$/," "):e}}))}},Dn={methods:{handleChange:function(e){H(e)?location.href=e:this.$router.push(e)}},computed:{currentVersionLink:function(){for(var e=this.$store.getters.config.versions,t=0,n=Object.keys(e);t'+e+""}:e},Un={name:"banner-footer",extend:function(e){var t=e.store.getters.config,n=t.banner,r=t.footer;n&&e.registerComponent("content:start",Gn(n,"docute-banner")),r&&e.registerComponent("content:end",Gn(r,"docute-footer"))}},Zn={data:function(){var e=localStorage.getItem("docute:theme");return{dark:"dark"in this.$route.query||("dark"===e||"default"!==e&&"dark"===this.$store.getters.config.theme)}},created:function(){this.$store.commit("SET_THEME",this.dark?"dark":"default")},methods:{handleChange:function(){var e=this.$store.getters.config.theme;this.dark=!this.dark,this.$store.commit("SET_THEME",this.dark?"dark":"dark"===e?"default":e),localStorage.setItem("docute:theme",this.dark?"dark":"default")}}},qn=(n(59),h(Zn,(function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"dark-theme-toggler"},[t("div",{staticClass:"toggle",class:{checked:this.dark},on:{click:this.handleChange}},[this._m(0),this._v(" "),t("div",{staticClass:"toggle-thumb"})]),this._v(" "),t("input",{staticClass:"toggler-screen-reader-only",attrs:{type:"checkbox","aria-label":"Switch between Dark and Default theme"},domProps:{checked:this.dark}})])}),[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"toggle-track"},[t("div",{staticClass:"toggle-track-check"},[t("img",{staticStyle:{"pointer-events":"none"},attrs:{src:"data:image/png;base64,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",width:"16",height:"16",role:"presentation"}})]),this._v(" "),t("div",{staticClass:"toggle-track-x"},[t("img",{staticStyle:{"pointer-events":"none"},attrs:{src:"data:image/png;base64,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",width:"16",height:"16",role:"presentation"}})])])}],!1,null,"d69f2884",null).exports),Vn={name:"dark-theme-toggler",extend:function(e){var t=e.store.getters.config.darkThemeToggler;!0===t?e.registerComponent("sidebar:post-end",qn):"sidebar"===t&&(e.registerComponent("header-right:start",qn),e.registerComponent("mobile-sidebar:start",qn))}};function Kn(e,t,n,r){var i,o=!1,a=0;function s(){i&&clearTimeout(i)}function c(){var c=this,u=Date.now()-a,l=arguments;function f(){a=Date.now(),n.apply(c,l)}o||(r&&!i&&f(),s(),void 0===r&&u>e?f():!0!==t&&(i=setTimeout(r?function(){i=void 0}:f,void 0===r?e-u:e)))}return"boolean"!==typeof t&&(r=n,n=t,t=void 0),c.cancel=function(){s(),o=!0},c}var Jn,Wn,Yn,Xn,Qn={data:function(){return{result:[],focused:!1}},watch:{"$route.fullPath":function(){this.focused=!1}},mounted:function(){document.addEventListener("click",this.handleClick)},beforeDestroy:function(){document.removeEventListener("click",this.handleClick)},computed:{enabled:function(){return this.$pluginApi.search.enabled}},methods:{handleClick:function(e){this.$el.contains(e.target)&&!this.$refs.result.contains(e.target)||(this.focused=!1)},handleSearch:(Jn=300,Xn=function(e){var t,n,r,i=this,o=i.$pluginApi.search.handler;return t=o(e.target.value),n=function(e){i.result=e},r?n?n(t):t:(t&&t.then||(t=Promise.resolve(t)),n?t.then(n):t)},Wn=function(){for(var e=[],t=0;t 0,expression:"result.length > 0"}],ref:"result",staticClass:"search-result"},e._l(e.result,(function(t,r){return n("router-link",{key:r,staticClass:"search-result-item",attrs:{to:t.link}},[n("div",{staticClass:"item-header"},[n("div",{staticClass:"item-title",domProps:{innerHTML:e._s(t.title)}}),e._v(" "),t.label?n("span",{staticClass:"item-label"},[e._v(e._s(t.label))]):e._e()]),e._v(" "),n("div",{staticClass:"item-desc",domProps:{innerHTML:e._s(t.description)}})])})),1)])]):e._e()}),[],!1,null,"026453b4",null).exports),tr={name:"search",extend:function(e){e.registerComponent("header-right:start",er)}};r.a.component(Cn.name,Cn),r.a.component($n.name,$n),r.a.component(On.name,On),r.a.component(Tn.name,Tn),r.a.component(Mn.name,Mn),r.a.component(jn.name,jn),r.a.component(Fn.name,Fn),r.a.use((function(e){e.component("v-style",wn("style")),e.component("v-script",wn("script"))})),r.a.mixin({created:function(){var e=this.$options.pluginApi||this.$root.$pluginApi;e&&(this.$pluginApi=e)}});var nr=function(){function e(e){void 0===e&&(e={});var t=kn(e.router);Object(i.sync)(ee,t),this.router=t,this.store=ee,ee.commit("SET_CONFIG",Object.assign({title:U&&document.title},e));var n=[Nn,zn,Bn,Un,Vn,tr].concat(ee.state.originalConfig.plugins||[]);this.pluginApi=new p({plugins:n,store:ee,router:t}),this.applyPlugins(),this.app=new r.a({router:t,store:ee,pluginApi:this.pluginApi,render:function(e){return e(v)}}),!1!==e.mount&&this.mount()}var t=e.prototype;return t.mount=function(){var e=ee.getters.target;return window.__DOCUTE_INITIAL_STATE__?this.app.$mount("#"+e,!0):this.app.$mount("#"+e),this},t.applyPlugins=function(){var e=this.pluginApi.plugins,t=Array.isArray(e),n=0;for(e=t?e:e[Symbol.iterator]();;){var r;if(t){if(n>=e.length)break;r=e[n++]}else{if((n=e.next()).done)break;r=n.value}r.extend(this.pluginApi)}},e}();nr.version="4.23.3";t.default=nr;"undefined"!==typeof window&&(window.Vue=r.a,window.__DOCUTE_VERSION__="4.23.3")}]).default})); \ No newline at end of file diff --git a/docs/firebase.json b/docs/firebase.json index 6d6d747d8..8587fcb35 100644 --- a/docs/firebase.json +++ b/docs/firebase.json @@ -1,14 +1,7 @@ { "hosting": { "site": "pixelplumbing-sharp", - "public": ".", - "ignore": [ - ".*", - "build.js", - "firebase.json", - "image/**", - "search-index/**" - ], + "public": "dist", "headers": [ { "source": "**", diff --git a/docs/image/sharp-logo-32.png b/docs/image/sharp-logo-32.png deleted file mode 100644 index 76307b00a81080d0b47be1730ee3bb2d1d7db90b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 652 zcmV;70(1R|P) Ir&NwHiJWwNIL#`0b)kBs7p@}q8ENwx)$U1q}g92e!XD2}nb5anw`1sdr= zeZm4Ua_q$AAi|je;bRyeXIoD6KP`iB3Bf^liQx;vpSqIw2*6mrfw0~vVaEWLpT?r1 z6huiIpR?j|$nn?(La|c-qx=%(Q^X4MnG%DWA2P#YGfCrj33lfRCLa^bdfXCa##Ii? z`|Rk<2ZZYg0fr5P3Wiq*f+2x0ef~91vn#cM=ZkFXo)IlDg3BlYTOtc&al?VT3(#Qn z48UQSEb*QKq)RL?#{|N3bxWnX#g*#Wy4VqbC_|3NxOkk%lt@iIAsBl|Fmj(D<~Gq$ zhC7=kFBFIwWig_(e%RY@ms@M)s-BT86L(kGSLf}P&&IORtl6{)u!dMl-LTab0M-$T zRsXq$vE+LQu!?X2!% qOl};3ebcP^a1(+%>iT>L`a8p mtYZMNoC`m@bF1v3OXDx1F?8aUPT)TP0000 km&viW?o)7o$oc}rh^Z#(4`~IDi zb2!jfPaC6+Kp^yp2fauLggO8}8<5b*p@Wy^q2`;zheEs$#hxveArQp~em|nPAHnZK z9BDxm_aQb25WaPAh~UGs5aFpNgp o#=4zTi6Iuxe z!+t~{bPVA~4IwDqhCpZ+6TLh`QpV=SgXjgmrrq!Q9|Y{hr`V(%>?*nPhvml3gLFad zLPbjc{t6L`T@;zEk>|FpEo7{O^5$mCrVc@duP3tWVkLc-XI!l0lJY$6Sg_N$?r1V? zI&FeK(Ko;P!jNmgXC;>>F9iraH;&3a&=%j&doXXtUYi1xOw`sdpp{ZKes|F73t9g~ zq5nN4=E`tKBZ3#o+ge|rlq|sr6tlw?6KO(y;1Vruf)cjvP%bN6151cFAy^KB}v2J zS<&o!3}LlngUtPogzf5@fg-z^1l$GMi6?C%a U)>gkU^3r@tP80Fh4ETF&!Y=cL}E1=Sf zcFxWaV%4=_tuRteR9W0RZ zS^x?gqx_&=TT$5u(tFOQE)M*DzmOihhu1%flugYp#C(q>%TWisEn1!;<3>>GzzuB7 zWW6~dkL!?lNRvk+qWQfRwO&NDi@=%ul*@H+&BoO*%3JdHkf#Ro&?uR^t;p1U8pZpb zEa7^%ex1{-wiOs3$-9BnAuO8&aDiYVwG7aZU0|Sd*i1()@KX)ePVv<;@G12hKtDC% zIC!KLV9iO-io+em8gMI67i*sh@9JVV%Ttt1?A&IYrtD>PXf&vY26)bOlEizB=4jRF zXfWcItBNgt5x>p1d&OZZ@3;1Ft0-^2*#*_7$)&~eC%~UHR%CqlYWaa*AFd=BFzjPb znrWphuC1&)tHmYUUAg(J3!@i88aEY%XZqoFz*806UiI2~PPOwNLHHlQ{sfwR8puhY z8Gyg&WY3E50<$w7?hBod;<>xXsCd26^FOb%S|(zx(m}3CzaoG2) By z$ln3|^X3^bg^T=!!nrwb(d7eW;pu D`KJ`0EM?F1lCbdB5+s>>QH`%3#PRL?E%oRpj|FH=q!xd)!JJpq Xp)CVW0I1`4lkB3(4T@+)7@+8c~EfS)u+!)CfH*YM4w? zJH@I1nt36CKywkCqf5TR)fUNz@|dsRr{9f=-t7b~LSk)?fBA8+BhU}%AGL8_Uu`%D zSO-fP%CLJb@BfrpQR}do%}oi+=5?6_kH_t}E;46#kJ;lyY_Wbpfi8H=LEOjXW-c5u zS5UE7q^gDhdO|NI2m0L{L^pJ#7!rw+CSmB=QXncFw1sM=U8N=5!m<96<5 zq>+*8w=K{j#dC=Jc$Hjk*23}0!Vm|*_9r;i8%~Y0c{#*2RjhJ+l88Cd8Ar^kXa0V= z3StYb{jcuuILB&fLyusC?1GSwfPmJ7frJp78ROyVC`}xplcfz$<}`0DMZP6mbkd!9 zS7Xp3l;U4t%qP}w#`9Y>6x)BbUJ5cvo$!XG^aS;pOo)uXzW;mZq#1N7RZH=^a69rT zMg<`smg=u| %B!?G1uVj@V>CHtGGE` %{)~AX~Ax{;Ef6S`Np_YHe2Qp@65wj9C-$_v}?vKIUT1*+Z4G|Ke`G>}1zgnN8*7 z*x{&vtsINht+i~ctfbcY+2LXVnY;p4R}XuSYsWuV!lZs$Dl6cbv%pJSe-WD|ByNer z5Z;&s`~nzKh!gb9T^OWIx6k_{YXFDeTg~Ht6#K - - - - - - - - - - - - - - - sharp - High performance Node.js image processing - - - - - - - - - \ No newline at end of file diff --git a/docs/package.json b/docs/package.json new file mode 100644 index 000000000..fdc3582b3 --- /dev/null +++ b/docs/package.json @@ -0,0 +1,17 @@ +{ + "name": "sharp-docs", + "type": "module", + "version": "0.0.1", + "private": true, + "scripts": { + "dev": "astro dev", + "start": "astro dev", + "build": "astro build", + "preview": "astro preview", + "astro": "astro" + }, + "dependencies": { + "@astrojs/starlight": "^0.31.0", + "astro": "^5.1.7" + } +} diff --git a/docs/image/api-resize-fit.svg b/docs/public/api-resize-fit.svg similarity index 100% rename from docs/image/api-resize-fit.svg rename to docs/public/api-resize-fit.svg diff --git a/docs/image/sharp-logo.svg b/docs/public/favicon.svg similarity index 100% rename from docs/image/sharp-logo.svg rename to docs/public/favicon.svg diff --git a/docs/humans.txt b/docs/public/humans.txt similarity index 100% rename from docs/humans.txt rename to docs/public/humans.txt diff --git a/docs/public/robots.txt b/docs/public/robots.txt new file mode 100644 index 000000000..a829753d9 --- /dev/null +++ b/docs/public/robots.txt @@ -0,0 +1,4 @@ +User-agent: * +Disallow: + +Sitemap: https://sharp.pixelplumbing.com/sitemap-index.xml diff --git a/docs/image/sharp-logo-mono.svg b/docs/public/sharp-logo-mono.svg similarity index 100% rename from docs/image/sharp-logo-mono.svg rename to docs/public/sharp-logo-mono.svg diff --git a/docs/public/sharp-logo.svg b/docs/public/sharp-logo.svg new file mode 100644 index 000000000..fc185469f --- /dev/null +++ b/docs/public/sharp-logo.svg @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/docs/robots.txt b/docs/robots.txt deleted file mode 100644 index 6f27bb66a..000000000 --- a/docs/robots.txt +++ /dev/null @@ -1,2 +0,0 @@ -User-agent: * -Disallow: \ No newline at end of file diff --git a/docs/search-index.json b/docs/search-index.json deleted file mode 100644 index e880a55cd..000000000 --- a/docs/search-index.json +++ /dev/null @@ -1 +0,0 @@ -[{"t":"Prerequisites","d":"Node-API v9 compatible runtime e.g. Node.js 18.17.0 or 20.3.0.","k":"prerequisites node api compatible runtime","l":"/install#prerequisites"},{"t":"Prebuilt binaries","d":"Ready-compiled sharp and libvips binaries are provided for use on the most common platforms macOS x64 10.15 macOS ARM64 Linux ARM glibc 2.31 Linux ARM64 glibc 2.26, musl 1.2.2 Linux ppc64 glibc 2.31 L","k":"prebuilt binaries compiled libvips common platforms macos arm linux glibc musl ppc","l":"/install#prebuilt-binaries"},{"t":"Custom libvips","d":"To use a custom, globally-installed version of libvips instead of the provided binaries, make sure it is at least the version listed under config.libvips in the package.json file and that it can be lo","k":"custom libvips globally installed version instead binaries listed config package json file","l":"/install#custom-libvips"},{"t":"Building from source","d":"This module will be compiled from source at npm install time when a globally-installed libvips is detected, or when the npm install --build-from-source flag is used. The logic to detect a globally-ins","k":"building source module compiled npm install time globally installed libvips detected build flag logic detect ins","l":"/install#building-from-source"},{"t":"WebAssembly","d":"Experimental support is provided for runtime environments that provide multi-threaded Wasm via Workers. Use in web browsers is unsupported. Native text rendering is unsupported. Tile-based output/api-","k":"webassembly experimental runtime environments multi threaded wasm workers web browsers native text rendering tile output api","l":"/install#webassembly"},{"t":"FreeBSD","d":"The vips package must be installed before npm install is run. sh pkg install -y pkgconf vips sh cd /usr/ports/graphics/vips/ make install clean","k":"freebsd vips package installed npm install pkg pkgconf usr ports graphics clean","l":"/install#freebsd"},{"t":"Linux memory allocator","d":"The default memory allocator on most glibc-based Linux systems e.g. Debian, Red Hat is unsuitable for long-running, multi-threaded processes that involve lots of small memory allocations. For this rea","k":"linux memory allocator glibc systems debian red hat long running multi threaded processes small allocations rea","l":"/install#linux-memory-allocator"},{"t":"AWS Lambda","d":"The node_modules directory of the deployment package must include binaries for either the linux-x64 or linux-arm64 platforms depending on the chosen architecture. When building your deployment package","k":"aws lambda nodemodules directory deployment package binaries linux arm platforms depending chosen architecture building","l":"/install#aws-lambda"},{"t":"webpack","d":"Ensure sharp is excluded from bundling via the externals configuration. js externals sharp commonjs sharp","k":"webpack excluded bundling externals configuration commonjs","l":"/install#webpack"},{"t":"esbuild","d":"Ensure sharp is excluded from bundling via the external","k":"esbuild excluded bundling external","l":"/install#esbuild"},{"t":"vite","d":"Ensure sharp is excluded from bundling via the build.rollupOptions configuration. js import defineConfig from vite export default defineConfig build rollupOptions external sharp","k":"vite excluded bundling build rollupoptions configuration import defineconfig export external","l":"/install#vite"},{"t":"TypeScript","d":"TypeScript definitions are published as part of the sharp package from v0.32.0. Previously these were available via the types/sharp package, which is now deprecated. When using Typescript, please ensu","k":"typescript definitions published package types ensu","l":"/install#typescript"},{"t":"Fonts","d":"When creating text images or rendering SVG images that contain text elements, fontconfig is used to find the relevant fonts. On Windows and macOS systems, all system fonts are available for use. On ma","k":"fonts creating text images rendering svg contain elements fontconfig find relevant windows macos systems system","l":"/install#fonts"},{"t":"Canvas and Windows","d":"If both canvas and sharp modules are used in the same Windows process, the following error may occur The specified procedure could not be found.","k":"canvas windows modules process error procedure could found","l":"/install#canvas-and-windows"},{"t":"Sharp","d":"Emits codeSharpeventinfo/code, codeSharpeventwarning/code a namenew_Sharp_new/a","k":"emits code fail limit input pixels unlimited sequential read density ignore icc pages page subifd level pdf background animated raw create text","l":"/api-constructor#sharp"},{"t":"clone","d":"Take a snapshot of the Sharp instance, returning a new instance. Cloned instances inherit the input of their parent instance. This allows multiple output Streams and therefore multiple processing pip","k":"clone snapshot instance returning new cloned instances inherit input parent multiple output streams processing pip","l":"/api-constructor#clone"},{"t":"metadata","d":"Fast access to uncached image metadata without decoding any compressed pixel data.","k":"metadata fast access uncached decoding compressed pixel data","l":"/api-input#metadata"},{"t":"stats","d":"Access to pixel-derived image statistics for every channel in the image. A Promise is returned when callback is not provided.","k":"stats access pixel derived statistics channel promise","l":"/api-input#stats"},{"t":"toFile","d":"Write output image data to a file.","k":"tofile write output data file","l":"/api-output#tofile"},{"t":"toBuffer","d":"Write output to a Buffer. JPEG, PNG, WebP, AVIF, TIFF, GIF and raw pixel data output are supported.","k":"tobuffer write output buffer jpeg png webp avif tiff gif raw pixel data resolve object","l":"/api-output#tobuffer"},{"t":"keepExif","d":"Keep all EXIF metadata from the input image in the output image.","k":"keepexif keep exif metadata input output","l":"/api-output#keepexif"},{"t":"withExif","d":"Set EXIF metadata in the output image, ignoring any EXIF in the input image.","k":"withexif exif metadata output ignoring input","l":"/api-output#withexif"},{"t":"withExifMerge","d":"Update EXIF metadata from the input image in the output image.","k":"withexifmerge update exif metadata input output","l":"/api-output#withexifmerge"},{"t":"keepIccProfile","d":"Keep ICC profile from the input image in the output image.","k":"keepiccprofile keep icc profile input output","l":"/api-output#keepiccprofile"},{"t":"withIccProfile","d":"Transform using an ICC profile and attach to the output image.","k":"withiccprofile transform icc profile attach output","l":"/api-output#withiccprofile"},{"t":"keepMetadata","d":"Keep all metadata EXIF, ICC, XMP, IPTC from the input image in the output image.","k":"keepmetadata keep metadata exif icc xmp iptc input output","l":"/api-output#keepmetadata"},{"t":"withMetadata","d":"Keep most metadata EXIF, XMP, IPTC from the input image in the output image.","k":"withmetadata keep metadata exif xmp iptc input output orientation density","l":"/api-output#withmetadata"},{"t":"toFormat","d":"Force output to a given format.","k":"toformat force output format","l":"/api-output#toformat"},{"t":"jpeg","d":"Use these JPEG options for output image.","k":"jpeg output quality progressive chroma subsampling optimise coding optimize mozjpeg trellis quantisation overshoot deringing scans table quantization force","l":"/api-output#jpeg"},{"t":"png","d":"Use these PNG options for output image.","k":"png output progressive compression level adaptive filtering palette quality effort colours colors dither force","l":"/api-output#png"},{"t":"webp","d":"Use these WebP options for output image.","k":"webp output quality alpha lossless near smart subsample deblock preset effort loop delay min size mixed force","l":"/api-output#webp"},{"t":"gif","d":"Use these GIF options for the output image.","k":"gif output reuse progressive colours colors effort dither inter frame max error palette loop delay force","l":"/api-output#gif"},{"t":"tiff","d":"Use these TIFF options for output image.","k":"tiff output quality force compression predictor pyramid tile width height xres yres resolution unit bitdepth miniswhite","l":"/api-output#tiff"},{"t":"avif","d":"Use these AVIF options for output image.","k":"avif output quality lossless effort chroma subsampling bitdepth","l":"/api-output#avif"},{"t":"heif","d":"Use these HEIF options for output image.","k":"heif output compression quality lossless effort chroma subsampling bitdepth","l":"/api-output#heif"},{"t":"jxl","d":"Use these JPEG-XL JXL options for output image.","k":"jxl jpeg output distance quality decoding tier lossless effort loop delay depth","l":"/api-output#jxl"},{"t":"tile","d":"Use tile-based deep zoom image pyramid output.","k":"tile deep zoom pyramid output size overlap angle background depth skip blanks container layout centre center basename","l":"/api-output#tile"},{"t":"timeout","d":"Set a timeout for processing, in seconds. Use a value of zero to continue processing indefinitely, the default behaviour.","k":"timeout processing seconds zero continue indefinitely behaviour","l":"/api-output#timeout"},{"t":"resize","d":"Resize image to width, height or width x height.","k":"resize width height fit position background kernel enlargement reduction fast shrink load","l":"/api-resize#resize"},{"t":"extend","d":"Extend / pad / extrude one or more edges of the image with either the provided background colour or pixels derived from the image. This operation will always occur after resizing and extraction, if a","k":"extend pad extrude edges background colour pixels derived operation resizing extraction","l":"/api-resize#extend"},{"t":"extract","d":"Extract/crop a region of the image.","k":"extract crop region left top width height","l":"/api-resize#extract"},{"t":"trim","d":"Trim pixels from all edges that contain values similar to the given background colour, which defaults to that of the top-left pixel.","k":"trim pixels edges contain similar background colour defaults top left pixel threshold line art","l":"/api-resize#trim"},{"t":"composite","d":"Composite images over the processed resized, extracted etc. image.","k":"composite images processed resized extracted","l":"/api-composite#composite"},{"t":"rotate","d":"Rotate the output image by either an explicit angle or auto-orient based on the EXIF Orientation tag.","k":"rotate output explicit angle auto orient exif orientation tag background","l":"/api-operation#rotate"},{"t":"flip","d":"Mirror the image vertically up-down about the x-axis. This always occurs before rotation, if any.","k":"flip mirror vertically down axis rotation","l":"/api-operation#flip"},{"t":"flop","d":"Mirror the image horizontally left-right about the y-axis. This always occurs before rotation, if any.","k":"flop mirror horizontally left right axis rotation","l":"/api-operation#flop"},{"t":"affine","d":"Perform an affine transform on an image. This operation will always occur after resizing, extraction and rotation, if any.","k":"affine transform operation resizing extraction rotation background idx idy odx ody interpolator","l":"/api-operation#affine"},{"t":"sharpen","d":"Sharpen the image.","k":"sharpen sigma","l":"/api-operation#sharpen"},{"t":"median","d":"Apply median filter. When used without parameters the default window is 3x3.","k":"median apply filter parameters window","l":"/api-operation#median"},{"t":"blur","d":"Blur the image.","k":"blur sigma precision min amplitude","l":"/api-operation#blur"},{"t":"flatten","d":"Merge alpha transparency channel, if any, with a background, then remove the alpha channel.","k":"flatten merge alpha transparency channel background remove","l":"/api-operation#flatten"},{"t":"unflatten","d":"Ensure the image has an alpha channel with all white pixel values made fully transparent.","k":"unflatten alpha channel white pixel made fully transparent","l":"/api-operation#unflatten"},{"t":"gamma","d":"Apply a gamma correction by reducing the encoding darken pre-resize at a factor of 1/gamma then increasing the encoding brighten post-resize at a factor of gamma. This can improve the perceived brigh","k":"gamma apply correction reducing encoding darken resize factor increasing brighten post improve perceived brigh alpha","l":"/api-operation#gamma"},{"t":"normalise","d":"Enhance output image contrast by stretching its luminance to cover a full dynamic range.","k":"normalise enhance output contrast stretching luminance cover full dynamic range lower upper","l":"/api-operation#normalise"},{"t":"normalize","d":"Alternative spelling of normalise.","k":"normalize normalise lower upper","l":"/api-operation#normalize"},{"t":"clahe","d":"Perform contrast limiting adaptive histogram equalization CLAHE.","k":"clahe contrast limiting adaptive histogram equalization width height max slope","l":"/api-operation#clahe"},{"t":"convolve","d":"Convolve the image with the specified kernel.","k":"convolve kernel","l":"/api-operation#convolve"},{"t":"threshold","d":"Any pixel value greater than or equal to the threshold value will be set to 255, otherwise it will be set to 0.","k":"threshold pixel greater equal otherwise greyscale grayscale raw","l":"/api-operation#threshold"},{"t":"recomb","d":"Recombine the image with the specified matrix.","k":"recomb recombine matrix","l":"/api-operation#recomb"},{"t":"modulate","d":"Transforms the image using brightness, saturation, hue rotation, and lightness. Brightness and lightness both operate on luminance, with the difference being that brightness is multiplicative whereas","k":"modulate transforms brightness saturation hue rotation lightness operate luminance difference being multiplicative whereas","l":"/api-operation#modulate"},{"t":"removeAlpha","d":"Remove alpha channel, if any. This is a no-op if the image does not have an alpha channel.","k":"removealpha remove alpha channel","l":"/api-channel#removealpha"},{"t":"ensureAlpha","d":"Ensure the output image has an alpha transparency channel. If missing, the added alpha channel will have the specified transparency level, defaulting to fully-opaque 1. This is a no-op if the image a","k":"ensurealpha output alpha transparency channel missing added level defaulting fully opaque","l":"/api-channel#ensurealpha"},{"t":"extractChannel","d":"Extract a single channel from a multi-channel image.","k":"extractchannel extract single channel multi","l":"/api-channel#extractchannel"},{"t":"joinChannel","d":"Join one or more channels to the image. The meaning of the added channels depends on the output colourspace, set with toColourspace. By default the output image will be web-friendly sRGB, with additi","k":"joinchannel join channels added depends output colourspace tocolourspace web friendly srgb additi","l":"/api-channel#joinchannel"},{"t":"tint","d":"Tint the image using the provided colour. An alpha channel may be present and will be unchanged by the operation.","k":"tint colour alpha channel present unchanged operation","l":"/api-colour#tint"},{"t":"greyscale","d":"Convert to 8-bit greyscale 256 shades of grey. This is a linear operation. If the input image is in a non-linear colour space such as sRGB, use gamma with greyscale for the best results. By default t","k":"greyscale convert bit shades grey linear operation input colour space srgb gamma results","l":"/api-colour#greyscale"},{"t":"grayscale","d":"Alternative spelling of greyscale.","k":"grayscale greyscale","l":"/api-colour#grayscale"},{"t":"pipelineColorspace","d":"Alternative spelling of pipelineColourspace.","k":"","l":"/api-colour#pipelinecolorspace"},{"t":"versions","d":"An Object containing the version numbers of sharp, libvips and when using prebuilt binaries its dependencies.","k":"versions object version numbers libvips prebuilt binaries dependencies","l":"/api-utility#versions"},{"t":"interpolators","d":"An Object containing the available interpolators and their proper values","k":"interpolators object","l":"/api-utility#interpolators"},{"t":"queue","d":"An EventEmitter that emits a change event when a task is either - queued, waiting for _libuv_ to provide a worker thread - complete","k":"queue eventemitter emits change event queued waiting libuv worker thread complete","l":"/api-utility#queue"},{"t":"cache","d":"Gets or, when options are provided, sets the limits of _libvips_ operation cache. Existing entries in the cache will be trimmed after any change in limits. This method always returns cache statistics","k":"cache limits libvips operation existing entries trimmed change method returns statistics memory files items","l":"/api-utility#cache"},{"t":"concurrency","d":"Gets or, when a concurrency is provided, sets the maximum number of threads _libvips_ should use to process _each image_. These are from a thread pool managed by glib, which helps avoid the overhead","k":"concurrency maximum number threads libvips process thread pool managed glib avoid overhead","l":"/api-utility#concurrency"},{"t":"counters","d":"Provides access to internal task counters. - queue is the number of tasks this module has queued waiting for _libuv_ to provide a worker thread from its pool. - process is the number of resize tasks","k":"counters provides access internal queue number tasks module queued waiting libuv worker thread pool process resize","l":"/api-utility#counters"},{"t":"simd","d":"Get and set use of SIMD vector unit instructions. Requires libvips to have been compiled with highway support.","k":"simd vector unit instructions libvips compiled highway","l":"/api-utility#simd"},{"t":"block","d":"Block libvips operations at runtime.","k":"block libvips operations runtime operation","l":"/api-utility#block"},{"t":"unblock","d":"Unblock libvips operations at runtime.","k":"unblock libvips operations runtime operation","l":"/api-utility#unblock"}] \ No newline at end of file diff --git a/docs/search-index/build.js b/docs/search-index/build.js deleted file mode 100644 index 67df86d23..000000000 --- a/docs/search-index/build.js +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright 2013 Lovell Fuller and others. -// SPDX-License-Identifier: Apache-2.0 - -'use strict'; - -const fs = require('fs'); -const path = require('path'); -const { extractDescription, extractKeywords, extractParameters } = require('./extract'); - -const searchIndex = []; - -// Install -const contents = fs.readFileSync(path.join(__dirname, '..', 'install.md'), 'utf8'); -const matches = contents.matchAll( - /## (?[A-Za-z0-9 ]+)\n\n(? [^#]+)/gs -); -for (const match of matches) { - const { title, body } = match.groups; - const description = extractDescription(body); - - searchIndex.push({ - t: title, - d: description, - k: extractKeywords(`${title} ${description}`), - l: `/install#${title.toLowerCase().replace(/ /g, '-')}` - }); -} - -// API -[ - 'constructor', - 'input', - 'output', - 'resize', - 'composite', - 'operation', - 'channel', - 'colour', - 'utility' -].forEach((section) => { - const contents = fs.readFileSync(path.join(__dirname, '..', `api-${section}.md`), 'utf8'); - const matches = contents.matchAll( - /## (?[A-Za-z]+)\n[^\n]+\n(? .+?)\n\n.+?(? \| Param .+?\n\n)?\*\*Example/gs - ); - for (const match of matches) { - const { title, firstparagraph, parameters } = match.groups; - const description = firstparagraph.startsWith('###') - ? 'Constructor' - : extractDescription(firstparagraph); - const parameterNames = parameters ? extractParameters(parameters) : ''; - - searchIndex.push({ - t: title, - d: description, - k: extractKeywords(`${title} ${description} ${parameterNames}`), - l: `/api-${section}#${title.toLowerCase()}` - }); - } -}); - -fs.writeFileSync( - path.join(__dirname, '..', 'search-index.json'), - JSON.stringify(searchIndex) -); diff --git a/docs/search-index/extract.js b/docs/search-index/extract.js deleted file mode 100644 index 64557c8b5..000000000 --- a/docs/search-index/extract.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright 2013 Lovell Fuller and others. -// SPDX-License-Identifier: Apache-2.0 - -'use strict'; - -const stopWords = require('./stop-words'); - -const extractDescription = (str) => - str - .replace(/### Examples.*/sg, '') - .replace(/\(http[^)]+/g, '') - .replace(/\s+/g, ' ') - .replace(/[^A-Za-z0-9_/\-,. ]/g, '') - .replace(/\s+/g, ' ') - .substring(0, 200) - .trim(); - -const extractParameters = (str) => - [...str.matchAll(/options\.(? [^.`\] ]+)/gs)] - .map((match) => match.groups.name) - .map((name) => name.replace(/([A-Z])/g, ' $1').toLowerCase()) - .join(' '); - -const extractKeywords = (str) => - [ - ...new Set( - str - .split(/[ -/]/) - .map((word) => word.toLowerCase().replace(/[^a-z]/g, '')) - .filter((word) => word.length > 2 && word.length < 15 && !stopWords.includes(word)) - ) - ].join(' '); - -module.exports = { extractDescription, extractKeywords, extractParameters }; diff --git a/docs/search-index/stop-words.js b/docs/search-index/stop-words.js deleted file mode 100644 index 60c6ebdc7..000000000 --- a/docs/search-index/stop-words.js +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright 2013 Lovell Fuller and others. -// SPDX-License-Identifier: Apache-2.0 - -'use strict'; - -module.exports = [ - 'about', - 'after', - 'all', - 'allows', - 'already', - 'also', - 'alternative', - 'always', - 'and', - 'any', - 'are', - 'available', - 'based', - 'been', - 'before', - 'best', - 'both', - 'call', - 'callback', - 'can', - 'containing', - 'contains', - 'created', - 'current', - 'date', - 'default', - 'deprecated', - 'does', - 'each', - 'either', - 'ensure', - 'entirely', - 'etc', - 'every', - 'except', - 'following', - 'for', - 'from', - 'get', - 'gets', - 'given', - 'has', - 'have', - 'helps', - 'how', - 'image', - 'implies', - 'include', - 'including', - 'involve', - 'its', - 'last', - 'least', - 'lots', - 'make', - 'may', - 'meaning', - 'more', - 'most', - 'much', - 'must', - 'non', - 'not', - 'now', - 'occur', - 'occurs', - 'one', - 'options', - 'other', - 'out', - 'over', - 'part', - 'perform', - 'performs', - 'please', - 'pre', - 'previously', - 'produce', - 'proper', - 'provide', - 'provided', - 'ready', - 'requires', - 'requiresharp', - 'returned', - 'run', - 'same', - 'see', - 'set', - 'sets', - 'sharp', - 'should', - 'since', - 'site', - 'some', - 'specified', - 'spelling', - 'such', - 'support', - 'supported', - 'sure', - 'take', - 'task', - 'than', - 'that', - 'the', - 'their', - 'then', - 'there', - 'therefore', - 'these', - 'this', - 'under', - 'unless', - 'unmaintained', - 'unsuitable', - 'unsupported', - 'until', - 'use', - 'used', - 'using', - 'value', - 'values', - 'via', - 'were', - 'when', - 'which', - 'while', - 'will', - 'with', - 'without', - 'you', - 'your' -]; diff --git a/docs/src/assets/sharp-logo.svg b/docs/src/assets/sharp-logo.svg new file mode 100644 index 000000000..fc185469f --- /dev/null +++ b/docs/src/assets/sharp-logo.svg @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/docs/src/content.config.ts b/docs/src/content.config.ts new file mode 100644 index 000000000..d9ee8c9d1 --- /dev/null +++ b/docs/src/content.config.ts @@ -0,0 +1,7 @@ +import { defineCollection } from 'astro:content'; +import { docsLoader } from '@astrojs/starlight/loaders'; +import { docsSchema } from '@astrojs/starlight/schema'; + +export const collections = { + docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }), +}; diff --git a/docs/api-channel.md b/docs/src/content/docs/api-channel.md similarity index 99% rename from docs/api-channel.md rename to docs/src/content/docs/api-channel.md index bd751d4d2..9c9637242 100644 --- a/docs/api-channel.md +++ b/docs/src/content/docs/api-channel.md @@ -1,3 +1,7 @@ +--- +title: Channel manipulation +--- + ## removeAlpha > removeAlpha() ⇒ Sharp
diff --git a/docs/api-colour.md b/docs/src/content/docs/api-colour.md similarity index 99% rename from docs/api-colour.md rename to docs/src/content/docs/api-colour.md index a16eb886a..2cc50b1be 100644 --- a/docs/api-colour.md +++ b/docs/src/content/docs/api-colour.md @@ -1,3 +1,7 @@ +--- +title: Colour manipulation +--- + ## tint > tint(tint) ⇒Sharp
diff --git a/docs/api-composite.md b/docs/src/content/docs/api-composite.md similarity index 99% rename from docs/api-composite.md rename to docs/src/content/docs/api-composite.md index e8b96de13..6ad583bbb 100644 --- a/docs/api-composite.md +++ b/docs/src/content/docs/api-composite.md @@ -1,3 +1,7 @@ +--- +title: Compositing images +--- + ## composite > composite(images) ⇒Sharp
diff --git a/docs/api-constructor.md b/docs/src/content/docs/api-constructor.md similarity index 99% rename from docs/api-constructor.md rename to docs/src/content/docs/api-constructor.md index 32a79a011..d39eafdc5 100644 --- a/docs/api-constructor.md +++ b/docs/src/content/docs/api-constructor.md @@ -1,3 +1,7 @@ +--- +title: Constructor +--- + ## Sharp > Sharp diff --git a/docs/api-input.md b/docs/src/content/docs/api-input.md similarity index 99% rename from docs/api-input.md rename to docs/src/content/docs/api-input.md index eaf00e235..8c32651d7 100644 --- a/docs/api-input.md +++ b/docs/src/content/docs/api-input.md @@ -1,3 +1,7 @@ +--- +title: Input metadata +--- + ## metadata > metadata([callback]) ⇒Promise.<Object>
\|Sharp
diff --git a/docs/api-operation.md b/docs/src/content/docs/api-operation.md similarity index 99% rename from docs/api-operation.md rename to docs/src/content/docs/api-operation.md index d38e209ff..c8c360c6e 100644 --- a/docs/api-operation.md +++ b/docs/src/content/docs/api-operation.md @@ -1,3 +1,7 @@ +--- +title: Image operations +--- + ## rotate > rotate([angle], [options]) ⇒Sharp
diff --git a/docs/api-output.md b/docs/src/content/docs/api-output.md similarity index 99% rename from docs/api-output.md rename to docs/src/content/docs/api-output.md index 4b0402391..a26a14c5a 100644 --- a/docs/api-output.md +++ b/docs/src/content/docs/api-output.md @@ -1,3 +1,7 @@ +--- +title: Output options +--- + ## toFile > toFile(fileOut, [callback]) ⇒Promise.<Object>
diff --git a/docs/api-resize.md b/docs/src/content/docs/api-resize.md similarity index 99% rename from docs/api-resize.md rename to docs/src/content/docs/api-resize.md index 8f0d7d20f..dd2284f70 100644 --- a/docs/api-resize.md +++ b/docs/src/content/docs/api-resize.md @@ -1,3 +1,7 @@ +--- +title: Resizing images +--- + ## resize > resize([width], [height], [options]) ⇒Sharp
diff --git a/docs/api-utility.md b/docs/src/content/docs/api-utility.md similarity index 99% rename from docs/api-utility.md rename to docs/src/content/docs/api-utility.md index 4c676bfe4..188c2d7a4 100644 --- a/docs/api-utility.md +++ b/docs/src/content/docs/api-utility.md @@ -1,3 +1,7 @@ +--- +title: Global properties +--- + ## versions > versions diff --git a/docs/changelog.md b/docs/src/content/docs/changelog.md similarity index 99% rename from docs/changelog.md rename to docs/src/content/docs/changelog.md index 9cc0280dc..46b00be1a 100644 --- a/docs/changelog.md +++ b/docs/src/content/docs/changelog.md @@ -1,5 +1,7 @@ -# Changelog - +--- +title: Changelog +--- + ## v0.34 - *hat* Requires libvips v8.16.0 diff --git a/docs/README.md b/docs/src/content/docs/index.md similarity index 97% rename from docs/README.md rename to docs/src/content/docs/index.md index 58466cd87..a6306308d 100644 --- a/docs/README.md +++ b/docs/src/content/docs/index.md @@ -1,4 +1,6 @@ -# sharp +--- +title: "High performance Node.js image processing" +--- @@ -23,6 +25,10 @@ rotation, extraction, compositing and gamma correction are available. Most modern macOS, Windows and Linux systems do not require any additional install or runtime dependencies. +```sh +npm install sharp +``` + ### Formats This module supports reading JPEG, PNG, WebP, GIF, AVIF, TIFF and SVG images. diff --git a/docs/install.md b/docs/src/content/docs/install.md similarity index 96% rename from docs/install.md rename to docs/src/content/docs/install.md index 0323d7601..553c86b2e 100644 --- a/docs/install.md +++ b/docs/src/content/docs/install.md @@ -1,8 +1,12 @@ -# Installation +--- +title: Installation +--- Works with your choice of JavaScript package manager. -> ⚠️ **Please ensure your package manager is configured to install optional dependencies** +:::caution +Please ensure your package manager is configured to install optional dependencies +::: If a package manager lockfile must support multiple platforms, please see the [cross-platform](#cross-platform) section @@ -59,7 +63,9 @@ within the same installation tree and/or using the same lockfile. ### npm v10+ -> ⚠️ **npm `package-lock.json` files can cause installation problems due to [npm bug #4828](https://github.com/npm/cli/issues/4828)** +:::caution +npm `package-lock.json` files shared by multiple platforms can cause installation problems due to [npm bug #4828](https://github.com/npm/cli/issues/4828) +::: Provides limited support via `--os`, `--cpu` and `--libc` flags. diff --git a/docs/performance.md b/docs/src/content/docs/performance.md similarity index 99% rename from docs/performance.md rename to docs/src/content/docs/performance.md index b16d3aefe..745dca8c0 100644 --- a/docs/performance.md +++ b/docs/src/content/docs/performance.md @@ -1,4 +1,6 @@ -# Performance +--- +title: Performance +--- A test to benchmark the performance of this module relative to alternatives. diff --git a/docs/src/styles/custom.css b/docs/src/styles/custom.css new file mode 100644 index 000000000..197ccf567 --- /dev/null +++ b/docs/src/styles/custom.css @@ -0,0 +1,45 @@ +@view-transition { + navigation: auto; +} + +:root { + --sl-content-width: 60rem; + --sl-color-accent-low: #072d00; + --sl-color-accent: #247f00; + --sl-color-accent-high: #aad7a0; + --sl-color-white: #ffffff; + --sl-color-gray-1: #eaf0e8; + --sl-color-gray-2: #c5cdc3; + --sl-color-gray-3: #99a796; + --sl-color-gray-4: #4f5c4d; + --sl-color-gray-5: #303c2d; + --sl-color-gray-6: #1f2a1c; + --sl-color-black: #151a13; +} + +:root[data-theme="light"] { + --sl-color-accent-low: #c0e2b8; + --sl-color-accent: #165800; + --sl-color-accent-high: #0d3e00; + --sl-color-white: #151a13; + --sl-color-gray-1: #1f2a1c; + --sl-color-gray-2: #303c2d; + --sl-color-gray-3: #4f5c4d; + --sl-color-gray-4: #82907f; + --sl-color-gray-5: #bdc4bb; + --sl-color-gray-6: #eaf0e8; + --sl-color-gray-7: #f4f7f3; + --sl-color-black: #ffffff; +} + +blockquote { + background-color: var(--sl-color-gray-6); + padding: 1rem; +} + +.site-title::after { + content: "High performance Node.js image processing"; + color: var(--sl-color-text); + font-size: var(--sl-text-sm); + padding-top: 0.3rem; +} diff --git a/docs/tsconfig.json b/docs/tsconfig.json new file mode 100644 index 000000000..8bf91d3bb --- /dev/null +++ b/docs/tsconfig.json @@ -0,0 +1,5 @@ +{ + "extends": "astro/tsconfigs/strict", + "include": [".astro/types.d.ts", "**/*"], + "exclude": ["dist"] +} diff --git a/package.json b/package.json index 1073ff4f3..9c6519e89 100644 --- a/package.json +++ b/package.json @@ -102,9 +102,9 @@ "test-types": "tsd", "package-from-local-build": "node npm/from-local-build", "package-from-github-release": "node npm/from-github-release", - "docs-build": "node docs/build && node docs/search-index/build", - "docs-serve": "cd docs && npx serve", - "docs-publish": "cd docs && npx firebase-tools deploy --project pixelplumbing --only hosting:pixelplumbing-sharp" + "docs-build": "node docs/build.mjs", + "docs-serve": "cd docs && npm start", + "docs-publish": "cd docs && npm run build && npx firebase-tools deploy --project pixelplumbing --only hosting:pixelplumbing-sharp" }, "type": "commonjs", "main": "lib/index.js",